Commit Graph

43 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
509cd3e95f fix: add support for --global flag to network:set command 2021-11-11 15:35:51 -05:00
Jose Diaz-Gonzalez
9ecfa843f0 feat: add support for routing an app to a specified host:port
This is useful when there is a service not managed by Dokku but should be exposed via the Dokku routing layer. As an example, some binaries (consul, nomad, vault) expose web uis, and are traditionally run on the host directly vs in a container.

Closes #4665
2021-08-06 01:29:25 -04:00
Jose Diaz-Gonzalez
017037586c feat: add ability to specify the initial container network
Closes #4477
2021-07-09 20:30:09 -04:00
Jose Diaz-Gonzalez
d55e34a55f refactor: use LogFailWithError to allow a unified exit code for golang commands when the app is missing 2021-02-28 15:20:46 -05:00
Jose Diaz-Gonzalez
d09a7506df refactor: bubble up error handling so that standard exit codes can be set at the top-level
LogFail shouldn't be called internally if at all possible.
2021-02-28 15:20:46 -05:00
Jose Diaz-Gonzalez
033b0952dd feat: allow formatting :report command output as json 2021-02-01 22:23:30 -05:00
Jose Diaz-Gonzalez
666bb9dfee fix: unscope err for report subcommands 2021-01-07 01:12:50 -05:00
Jose Diaz-Gonzalez
1439e8b30b hack: parse out the info flags for report subcommands separately
pflag doesn't ignore unspecified arguments, so they must be parsed out separately first.
2020-12-21 01:36:59 -05:00
Jose Diaz-Gonzalez
8240790381 fix: correct argument handling when setting the --app flag
When setting the `--app` flag, there was a special case for the config plugin. This plugin used to take the `--no-restart` flag as the first argument - and still did until this change - resulting in an invalid call to the plugin subcommands. What is worse is that this functionality carried over to all other plugins as they were rewritten in golang, and thus the issue spread without us knowing.

The fix is to support GNU flag parsing rules, which Golang does not do by default (Because Of Reasons™). Switching to `github.com/spf13/pflag` fixes this issue, and also allows positional arguments to be placed wherever, even in the middle of flags.

Closes #4255
2020-12-20 22:06:33 -05:00
Jose Diaz-Gonzalez
45e3623ffd refactor: switch to go mod
This hopefully makes it a little easier to work with as the tooling is now based on something in golang core.

- move columnize usage to common plugin
- remove old vendor files
2020-06-28 01:11:28 -04:00
Jose Diaz-Gonzalez
91a668ee8f feat: simplify flag parsing in network plugin
Commands should be written such that they take arguments as is.
2020-05-29 01:59:50 -04:00
Jose Diaz-Gonzalez
38a13ecd39 feat: expose network listeners to nginx templates for all process types
This change allows users to specify a custom nginx.conf.sigil that can expose non-web process types to the outside world in addition to the web process type.

Closes #3258
2020-03-11 12:34:38 -04:00
Jose Diaz-Gonzalez
26e8524ae5 refactor: surface errors when running reports 2020-02-22 06:40:24 -05:00
Jose Diaz-Gonzalez
7389bb3f03 fix: properly handle returned errors 2020-02-17 20:42:29 -05:00
Jose Diaz-Gonzalez
63f4ec3867 feat: call clone/destroy prop commands as necessary 2020-02-17 19:08:39 -05:00
Jose Diaz-Gonzalez
ef7894fdfa refactor: standardize help generation 2020-02-10 00:37:00 -05:00
Jose Diaz-Gonzalez
c8537bff48 docs: document custom networking 2020-02-08 22:15:15 -05:00
Jose Diaz-Gonzalez
9818cc6461 feat: implement container network attaching
Containers can be attached:

- after they are created, but before they are started
- after a successful deploy, but before the proxy reloads

This allows folks to have flexibility around when they would like a container to be made available to a network.
2020-02-08 19:55:29 -05:00
Jose Diaz-Gonzalez
6a7d2e5252 refactor: decrease compile time for golang plugins
This change refactors the compiled golang plugins into 3 distinct binaries:

- commands: already existing
- subcommands/subcommands: entrypoint into all subcommands
- triggers: entrypoint into all triggers

It then further symlinks triggers and subcommands to the built binaries. This results in both a much faster build process as well as smaller package size.
2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
a984464931 fix: drop extra % sign in common.LogVerboseQuiet 2019-07-03 13:53:56 -04:00
Jose Diaz-Gonzalez
a4c30c2ba9 chore: standardize variable naming 2019-04-08 16:36:30 -04:00
Jose Diaz-Gonzalez
884c45de0c chore: move print calls together 2019-03-05 21:34:26 -05:00
Jose Diaz-Gonzalez
6f1e964c9f refactor: ensure all property-handling functions return an error
This will allow upstream functions to handle errors in the most appropriate manner
2019-03-05 21:34:26 -05:00
Jose Diaz-Gonzalez
af8718cebe fix: ensure official golang plugins have correct help output
Previously, golang plugins would omit subcommands for 'dokku help --all', meaning they could not be introspected upon by outside tooling.
2019-01-20 22:50:48 -05:00
Jose Diaz-Gonzalez
cfd8f237df feat: cleanup IP and PORT files on app clone 2018-12-28 17:02:06 -05:00
Jose Diaz-Gonzalez
4aac1fd936 feat: add report trigger
This allows users to quickly show the state of any configured application, as well as the state of their server. In doing so, we make it easy for them to provide information necessary for debugging in a single command.
2018-04-07 04:49:21 -04:00
Jose Diaz-Gonzalez
6d43931e17 fix: properly set help output for golang applications
Closes #3007
2018-02-28 03:22:00 -05:00
Jose Diaz-Gonzalez
fa605b6a83 Merge pull request #3014 from dokku/dockerfile-network-ports
fix: handle case where DOKKU_DOCKERFILE_PORTS is an empty string
2017-12-17 00:56:48 -05:00
Jose Diaz-Gonzalez
1f08853fc7 fix: handle case where DOKKU_DOCKERFILE_PORTS is an empty string 2017-12-17 00:20:04 -05:00
Alex Quick
302d82a192 fix indentation for network/repo help 2017-12-15 10:06:45 -05:00
Kazuhiro NISHIYAMA
9706f7a298 Fix comments [ci skip]
fix comments of `func main()`
closes #2946
2017-11-03 15:55:18 +09:00
Kazuhiro NISHIYAMA
aeba3f2269 Fix comment
[ci skip]
2017-10-06 20:01:35 +09:00
Jose Diaz-Gonzalez
ad732bd42b feat: add network:report command 2017-10-04 00:58:29 -04:00
Michael Hobbs
8654783131 style tweaks 2017-10-02 16:50:05 -07:00
Jose Diaz-Gonzalez
3ca5503b74 fix: actually echo the property 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
acde3d60a7 feat: allow users to bind to all interfaces when a proxy is enabled
- use a plugin trigger to see whether we should bind to all interfaces
- create a generic way of setting properties for a plugin
- migrate proxy-enabled to the new network property "bind-all-interfaces"
- add network:set subcommand
2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
dc00542b6f refactor: remove use of IP and PORT files from core-post-deploy plugin 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
7fe2f8593c refactor: remove unused IS_HEROKUISH_CONTAINER argument 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
a3abf8016b fix: correct lint errors 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
6e76831b5d fix: use correct flag parameter for app name 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
25759bcbb4 fix: use correct flag positional argument 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
72eb8a06f0 fix: respond to all review comments 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
c788659b63 refactor: rewrite network plugin in golang 2017-10-02 15:05:13 -07:00