Commit Graph

506 Commits

Author SHA1 Message Date
Loïc Guitaut
a2427837dc Fix the destroy command
Checking for container with its service name instead of ID.
Doing a chmod 777 on `/data` before removing data from the service.
2015-10-12 11:12:30 +02:00
Jose Diaz-Gonzalez
0f4fdb414c Merge pull request #27 from dokku/lg-revamp-link-unlink
Revamp link/unlink commands
2015-10-05 10:34:03 -04: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
Jose Diaz-Gonzalez
781692cdd3 Merge pull request #25 from dokku/josegonzalez-patch-1
Add redis:help command
2015-09-27 17:27:04 -04:00
Jose Diaz-Gonzalez
f0378e8c8f Add redis:help command 2015-09-27 17:19:24 -04:00
Jose Diaz-Gonzalez
3058dded8e Merge pull request #24 from johnfraney/patch-1
Update README.md
2015-09-24 12:04:09 -04:00
Jose Diaz-Gonzalez
f5bb6b6bff Merge pull request #23 from dokku/lg-fix-wait-image
Use our own image to wait for services
2015-09-24 11:48:16 -04:00
John Franey
5a8df6f1c3 Update README.md
Add a note explaining how to examine the environment variables (through `dokku run my-app env` rather than `dokku config my-app`)
2015-09-24 09:19:41 -03:00
Loïc Guitaut
e7aed00674 Use our own image to wait for services 2015-09-24 11:52:08 +02:00
Jose Diaz-Gonzalez
624ed2592d Merge pull request #21 from dokku/josegonzalez-patch-1
Fix overlapping exported config
2015-09-23 15:11:37 -04:00
Jose Diaz-Gonzalez
37b84c3aa9 Set REDIS_ROOT environment variable as well
Since PLUGIN_DATA_ROOT is not directly overrideable anymore, we need to *also* set this env var here.
2015-09-23 15:03:58 -04:00
Jose Diaz-Gonzalez
f16e55e1a2 Fix overlapping exported config
If using multiple official dokku datastorage plugins, it is possible to get into a case where the `PLUGIN_DATA_ROOT` would be set incorrectly for other plugins.

Refs dokku/dokku-redis#20
2015-09-23 14:38:04 -04:00
Jose Diaz-Gonzalez
2cc967c1c5 Update README.md 2015-09-22 12:08:46 -04:00
Jose Diaz-Gonzalez
eb509d3928 Merge pull request #19 from dokku/lg-fix-install
Fix wrong version check on docker wait image
2015-09-22 11:56:57 -04:00
Loïc Guitaut
6fee13a05d Fix wrong version check on docker wait image 2015-09-22 16:04:33 +02:00
Jose Diaz-Gonzalez
6c450c3d53 Merge pull request #18 from dokku/lg-check-images
Add checks for all docker images in install hook
2015-09-21 10:15:14 -04:00
Jose Diaz-Gonzalez
fc6a5dc08b Merge pull request #16 from dokku/lg-docker-args-hooks
Use docker-args-* hooks instead of deprecated one
2015-09-21 10:15:06 -04:00
Jose Diaz-Gonzalez
ea89cad4ff Merge pull request #17 from dokku/lg-tty-on-connect
Do not always allocate a tty on `connect`
2015-09-21 10:12:48 -04:00
Loïc Guitaut
eae953c6e3 Add checks for all docker images in install hook 2015-09-21 14:20:44 +02:00
Loïc Guitaut
7ea002b2a6 Do not always allocate a tty on connect 2015-09-21 10:33:58 +02:00
Loïc Guitaut
e770a84529 Use docker-args-* hooks instead of deprecated one 2015-09-21 09:54:12 +02:00
Jose Diaz-Gonzalez
3167918848 Merge pull request #14 from dokku/josegonzalez-patch-1
Remove completed todos
2015-09-16 15:19:12 -07:00
Jose Diaz-Gonzalez
0b0f90a92a Remove completed todos 2015-09-16 15:12:40 -07:00
Jose Diaz-Gonzalez
7bfdf69b3c Merge pull request #13 from dokku/lg-fix-for-0.4
Fix compatibility with dokku 0.4+
2015-09-16 15:04:45 -07:00
Loïc Guitaut
38ac7c1b0f Fix compatibility with dokku 0.4+ 2015-09-17 00:01:34 +02:00
Jose Diaz-Gonzalez
b6b19faba8 Merge pull request #12 from dokku/lg-display-version-in-list
Display image & version in `list`
2015-09-16 14:51:49 -07:00
Loïc Guitaut
39a3bcf3af Display image & version in list 2015-09-16 17:49:23 +02:00
Jose Diaz-Gonzalez
6731e4b24b Merge pull request #11 from dokku/lg-fix-tests-0.4
Add compatibility for tests with dokku 0.4+
2015-09-15 14:14:41 -07:00
Loïc Guitaut
b4564e57a1 Add compatibility for tests with dokku 0.4+ 2015-09-15 23:08:57 +02:00
Jose Diaz-Gonzalez
0f9a938b97 Mention that the plugin defaults to installing a version 2015-09-15 02:02:21 -07:00
Jose Diaz-Gonzalez
b30bc0774e Merge pull request #9 from dokku/upgrade-redis
Upgrade to redis 3.0.4
2015-09-15 01:54:49 -07:00
Jose Diaz-Gonzalez
d10e951165 Upgrade to redis 3.0.4 2015-09-15 01:50:54 -07:00
Jose Diaz-Gonzalez
414ec234ba Merge pull request #8 from dokku/lg-import-export-clone
Add `export`, `import` and `clone` commands
2015-09-13 21:48:07 -04:00
Loïc Guitaut
57e4b08158 Add export, import and clone commands 2015-09-13 23:43:04 +02:00
Jose Diaz-Gonzalez
126ce8f8f7 Merge pull request #7 from dokku/lg-help-output
Compatibility with dokku 0.3.x & 0.4.x for help output
2015-09-11 17:53:20 -04:00
Loïc Guitaut
06ff9ec50f Compatibility with dokku 0.3.x & 0.4.x for help output 2015-09-11 23:35:41 +02:00
Jose Diaz-Gonzalez
04bdd7c3d5 Merge pull request #6 from dokku/lg-config-in-docker-stub
Generic way for `docker logs` output (test stub)
2015-09-10 10:44:03 -04:00
Loïc Guitaut
71f1d622f9 Generic way for docker logs output (test stub) 2015-09-10 16:28:53 +02:00
Jose Diaz-Gonzalez
fcf3e15ab2 Merge pull request #5 from dokku/lg-add-more-tests
Add more tests
2015-09-09 11:36:34 -04:00
Loïc Guitaut
bd2bad8e1a Add tests for every command 2015-09-09 17:30:14 +02:00
Loïc Guitaut
cc5c7fee25 Ability to echo back invoked command for docker
By setting `ECHO_DOCKER_COMMAND` to `true`, the mocked docker binary
will echo back the command used to call it instead of mocking a
response.
2015-09-09 17:30:14 +02:00
Loïc Guitaut
2a9f715eed Use aanand/wait image to wait for service to be ready 2015-09-09 17:30:14 +02:00
Jose Diaz-Gonzalez
cb36b55e29 Merge pull request #2 from dokku/lg-remove-docker-kill
Remove call to `docker kill`
2015-09-09 11:26:22 -04:00
Jose Diaz-Gonzalez
491f144086 Merge pull request #4 from dokku/lg-use-cli-from-docker
Remove dependencies & warning
2015-09-08 09:56:19 -04:00
Loïc Guitaut
9c64894ba6 Don’t display a warning when exposing ports 2015-09-08 11:10:47 +02:00
Loïc Guitaut
e76bb13edf Use redis-cli from docker image
Instead of installing dependencies on the host, directly use the binary
shipped with the redis docker image. This will also prevent possible
problems when API change for example.
2015-09-08 10:34:29 +02:00
Jose Diaz-Gonzalez
803b66e8ae Merge pull request #3 from dokku/lg-ports-info-in-list
Display which ports are exposed in `list`
2015-09-07 18:50:50 -04:00
Loïc Guitaut
151520d9ca Display which ports are exposed in list 2015-09-08 00:29:35 +02:00
Jose Diaz-Gonzalez
e1d3651199 Add plugin.toml 2015-09-07 04:29:54 -04:00
Loïc Guitaut
2ecc9df262 Remove call to docker kill 2015-09-07 10:28:23 +02:00