Commit Graph

38 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
425c7e07d1 Add missing mkdir calls 2016-08-27 01:39:31 -04:00
Jose Diaz-Gonzalez
9328c22801 Use cat and double-quotes when retrieving the password 2016-08-27 01:39:26 -04:00
Jose Diaz-Gonzalez
3450d5bf08 Add missing SERVICE_ROOT env var 2016-08-27 01:10:42 -04:00
Jose Diaz-Gonzalez
5c9f70c3fd Output the config/data directories when performing service:info 2016-08-27 00:56:54 -04:00
Jose Diaz-Gonzalez
031f5e4e3a Only wait for a single port 2016-08-26 23:05:34 -04:00
Jose Diaz-Gonzalez
0160aac115 Fix calls to docker-options plugin under all 0.4.x releases 2016-06-09 12:31:59 -04:00
Jose Diaz-Gonzalez
68fe59e7fd Alphabetize functions to improve organization 2016-05-16 02:28:32 -04:00
Jose Diaz-Gonzalez
6090fa6aa6 Remove remaining direct dokku calls 2016-05-16 00:27:26 -04:00
Jose Diaz-Gonzalez
85f0110356 Move all commands into subcommand structure 2016-05-15 23:07:24 -04:00
Jose Diaz-Gonzalez
f88531dd00 Remove call to dokku service:info in favor of service_info 2016-05-15 19:48:45 -04:00
Jose Diaz-Gonzalez
1ee3f67349 Use docker-options functions directly to avoid setting DOKKU_APP_NAME twice 2016-05-15 19:48:45 -04:00
Jose Diaz-Gonzalez
ae962bb7bf quote SERVICE_NAME value 2016-05-08 15:03:56 -04:00
Jose Diaz-Gonzalez
00ae636d01 use an extension for sed calls on os x 2016-05-08 15:03:44 -04:00
Jose Diaz-Gonzalez
f9d5e92d27 trim whitespace from url 2016-05-08 15:03:25 -04:00
Jose Diaz-Gonzalez
0992ffe49e shellcheck disable 2016-05-08 15:03:10 -04:00
Jose Diaz-Gonzalez
77c26644e9 use config functions properly 2016-05-08 15:02:34 -04:00
Jose Diaz-Gonzalez
dbbae006e8 Quote more variables 2016-05-08 03:11:18 -04:00
Jose Diaz-Gonzalez
93c720aeb7 quote $APP variable 2016-05-08 03:10:52 -04:00
Jose Diaz-Gonzalez
543fdaa633 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-08 03:10:41 -04:00
Jose Diaz-Gonzalez
40d35160d3 create container if not exists on service:start 2016-05-04 01:55:56 -04:00
Jose Diaz-Gonzalez
23d10ad09c Read POSTGRES_DATABASE_SCHEME variable from app when setting DATABASE_URL 2016-04-19 14:51:53 -04:00
Loïc Guitaut
9e37cefbbf Display infos from list command in columns
Also add a LINKS column to easily view which services are linked to
which apps
2015-10-12 12:01:48 +02:00
Loïc Guitaut
d6cb9b6834 Use complete service URL when checking config 2015-09-30 23:52:20 +02:00
Jose Diaz-Gonzalez
5c542287a3 Merge pull request #30 from dokku/lg-unlink-on-app-destroy
Remove linked app from links file when destroying app
2015-09-30 10:56:12 -04:00
Loïc Guitaut
bb7d44f39e Remove linked app from links file when destroying app 2015-09-29 23:10:26 +02:00
Loïc Guitaut
f0a647053b Replace underscore by dash in exposed hostname
Fixes #28
2015-09-29 18:51:49 +02:00
Loïc Guitaut
63047297ea Revamp link/unlink commands
Previously we were exporting `DATABASE_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 `DATABASE_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 `DATABASE_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_POSTGRES_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-09-28 18:21:52 +02:00
Loïc Guitaut
e9618101e5 Display image & version in list 2015-09-16 00:05:18 +02:00
Jose Diaz-Gonzalez
915750b1f2 Display which ports are exposed in list 2015-09-07 18:57:02 -04:00
Jose Diaz-Gonzalez
ad4fae1b2a Normalize database names in postgres. Closes #2 2015-09-07 01:49:28 -04:00
Jose Diaz-Gonzalez
ac2652fd92 make test 2015-09-06 22:53:02 -04:00
Jose Diaz-Gonzalez
2bc4c534b8 Properly implement port expose/unexpose 2015-09-06 22:10:16 -04:00
Jose Diaz-Gonzalez
5a4a87c62f Move alias, link, unlink and logs commands into functions 2015-08-29 03:19:44 -04:00
Jose Diaz-Gonzalez
46e4f6f4c8 Move service checks into commands file 2015-08-29 02:58:45 -04:00
Jose Diaz-Gonzalez
b160c88412 Move info and list commands into shared functions
Also add better output formatting for both commands
2015-08-29 02:53:11 -04:00
Jose Diaz-Gonzalez
2c7d4e5c77 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:50 -04:00
Jose Diaz-Gonzalez
972af5b984 Use central config for env vars 2015-08-29 01:53:34 -04:00
Jose Diaz-Gonzalez
e344e35144 initial commit 2015-08-23 18:56:23 -04:00