Commit Graph

96 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
b104279a51 Add --internal-ip flag to info command 2016-08-28 23:24:37 -04:00
Jose Diaz-Gonzalez
5d08332c69 Fix expose tests 2016-08-28 22:15:28 -04:00
Jose Diaz-Gonzalez
7eb2b47db7 Document exposed ports when an invalid number of arguments are specified 2016-08-28 21:25:10 -04:00
Jose Diaz-Gonzalez
0acf54fd3d Add --id flag 2016-08-28 17:56:30 -04:00
Jose Diaz-Gonzalez
fb3ff0f5a5 Add support for flags on the service:info command 2016-08-28 05:33:28 -04:00
Jose Diaz-Gonzalez
15aff18f55 Force bind to all interfaces
Newer versions of redis bind to 127.0.0.1 by default, causing issues with container linking.
2016-08-27 21:44:12 -04:00
Jose Diaz-Gonzalez
8ecf469d1e Add missing SERVICE_ROOT env var 2016-08-27 01:10:53 -04:00
Jose Diaz-Gonzalez
fa81a899ee Output the config/data directories when performing service:info 2016-08-27 00:54:12 -04:00
Jose Diaz-Gonzalez
68db55dd4e Use a quiet curl command 2016-08-27 00:12:14 -04:00
Jose Diaz-Gonzalez
eee9cb2be5 Only wait for a single port 2016-08-26 23:05:42 -04:00
Jose Diaz-Gonzalez
79e44c834f Fix calls to docker-options plugin under all 0.4.x releases 2016-06-09 12:32:15 -04:00
Jose Diaz-Gonzalez
34a81f748b Alphabetize functions to improve organization 2016-05-16 02:28:16 -04:00
Jose Diaz-Gonzalez
754e3500bd Remove remaining direct dokku calls 2016-05-16 00:27:41 -04:00
Jose Diaz-Gonzalez
8b104606e5 Remove call to dokku service:info in favor of service_info 2016-05-15 19:36:51 -04:00
Jose Diaz-Gonzalez
e399e6bc1a Use docker-options functions directly to avoid setting DOKKU_APP_NAME twice 2016-05-15 19:30:31 -04:00
Jose Diaz-Gonzalez
87c9914432 quote SERVICE_NAME value 2016-05-08 15:16:07 -04:00
Jose Diaz-Gonzalez
60b5fdec37 use an extension for sed calls on os x 2016-05-08 15:15:52 -04:00
Jose Diaz-Gonzalez
6f294aef3d trim whitespace from url 2016-05-08 15:15:40 -04:00
Jose Diaz-Gonzalez
a209106b7c shellcheck disable 2016-05-08 15:15:28 -04:00
Jose Diaz-Gonzalez
a710fd3abe use config functions properly 2016-05-08 15:15:01 -04:00
Jose Diaz-Gonzalez
d30c101fe3 Merge pull request #49 from dokku/minor-changes
Minor changes
2016-05-08 03:49:00 -04:00
Jose Diaz-Gonzalez
c4c3805c13 Quote more variables 2016-05-08 02:51:06 -04:00
Marcio Marchini
423bf1a4ef fix for #50 - remove /0 , be heroku-compatible 2016-05-05 13:08:11 -03:00
Jose Diaz-Gonzalez
10e2afbdef quote $APP variable 2016-05-04 13:58:14 -04:00
Jose Diaz-Gonzalez
817ebbd405 Rework how config vars are sourced
- ensure we source config/functions from the correct directory
- move config sourcing up before DOKKU_TRACE to reduce trace output
2016-05-04 13:57:49 -04:00
Jose Diaz-Gonzalez
eae373e679 create container if not exists on service:start 2016-05-04 00:52:11 -04:00
Jose Diaz-Gonzalez
5bcaf4fec5 Read REDIS_DATABASE_SCHEME variable from app when setting REDIS_URL 2016-04-19 14:52:09 -04:00
Loïc Guitaut
9f3ae5d078 Display infos from list command in columns
Also add a LINKS column to easily view which services are linked to
which apps
2015-10-13 10:47:18 +02:00
Loïc Guitaut
baeea96731 Revamp link/unlink commands
Previously we were exporting `REDIS_URL` via the docker-args* hooks.
This seems to confuse our users (since the env var is not displayed
when calling `dokku config`) and in some cases it also seems that the
env var is not correctly set.
Another problem is if several services are linked to the same app and
if they are exporting `REDIS_URL` as well. Then we don’t know what
will be set.

To resolve theses issues, this patch changes the way we manage the env
vars. We use standard dokku commands (`config` and `docker-options`) so
config is set on the linked application and can be reviewed by the user
easily.
We also handle the case where `REDIS_URL` is already set on the
linked application. When it’s the case, we automatically generate
another env var based on the following pattern: DOKKU_<service
name>_<random unused color>_URL. For example, this can give:
DOKKU_REDIS_BLACK_URL.

Since naming is now handled automatically, the `alias` command has been
removed. If the user wants to set a different env var on her app, it’s
just a matter of using `dokku config:set` and pasting the wanted value.

IP in DSN has been removed in favor of host name exported by docker in
the container. This is more robust and simpler since the IP can change
but the name will remain the same if the service container restarts for
instance.

With all those changes, a new command has been introduced: `promote`.
The goal of this command is to easily set a service as the primary one
when several are linked to an app. (see README for an example)
2015-10-05 15:29:36 +02:00
Loïc Guitaut
39a3bcf3af Display image & version in list 2015-09-16 17:49:23 +02:00
Loïc Guitaut
9c64894ba6 Don’t display a warning when exposing ports 2015-09-08 11:10:47 +02:00
Loïc Guitaut
151520d9ca Display which ports are exposed in list 2015-09-08 00:29:35 +02:00
Jose Diaz-Gonzalez
89fbc799e2 run linting 2015-09-06 22:36:32 -04:00
Jose Diaz-Gonzalez
89b48a2e3b Service must be started before we can call unpause 2015-09-06 20:42:23 -04:00
Jose Diaz-Gonzalez
f0c800b81d Do not fail on service_start when a service is already started
The desired state already exists, so this isn't strictly an error state.
2015-09-06 19:59:01 -04:00
Jose Diaz-Gonzalez
61d61eae70 Do not fail on service_stop when a service is already stopped
The desired state already exists, so this isn't strictly an error state.
2015-09-06 19:39:41 -04:00
Jose Diaz-Gonzalez
f72bf5402d Label running containers
This will avoid issues where `dokku cleanup` removes the stopped containers (it should not do so, and instead should allow them to stay in stopped mode).

Containers will be labeled as follows:

- service: dokku=service dokku.service=SERVICE_NAME
- ambassador: dokku=ambassador dokku.ambassador=SERVICE_NAME

To destroy the containers, simply run the `service:destroy` command.
2015-09-06 19:29:28 -04:00
Jose Diaz-Gonzalez
f1ac4bbe71 Fix logging output for start/stop of container 2015-09-06 18:23:52 -04:00
Loïc Guitaut
16fb91cf16 Enable working expose/unexpose commands
`expose` and `unexpose` commands are now fully functionnal using the
ambassador pattern. This has the advantage to be a 100% docker solution
and to not have to restart the service container. Multiple ports are
exposed when service specify them.

`start` and `stop` commands have been made more robust. When calling
`start` or `stop` on an already started (or stopped) service, an error
will be printed out instead of issuing failing commands.

Exposed services will still be exposed after a `restart`. Also the
service containers (and ambassador containers) will start automatically
when docker boot up.
2015-09-06 15:23:04 +02:00
Jose Diaz-Gonzalez
ac50d9c37c first - broken - pass at start/stop commands and working expose/expose commands
note that at the moment the iptables calls complete successfully but the container isn't actually exposed. We'll probably need to use the ambassador pattern to do this properly.
2015-08-31 15:29:23 -04:00
Jose Diaz-Gonzalez
075a39fe13 Move alias, link, unlink and logs commands into functions 2015-08-29 03:18:34 -04:00
Jose Diaz-Gonzalez
3fcdb0b869 Move service checks into commands file 2015-08-29 02:58:38 -04:00
Jose Diaz-Gonzalez
08f90bf4c6 Move info and list commands into shared functions
Also add better output formatting for both commands
2015-08-29 02:53:39 -04:00
Jose Diaz-Gonzalez
fb51474367 Remove service verification from service_url function
It is not necessary to do so in a function that is called from other places that already verify the name.
2015-08-29 02:49:16 -04:00
Jose Diaz-Gonzalez
5736336276 Use central config for env vars 2015-08-29 01:52:55 -04:00
Jose Diaz-Gonzalez
c64b7c07be initial commit 2015-08-23 19:17:51 -04:00