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.
This commit is contained in:
Loïc Guitaut
2015-09-01 23:58:04 +02:00
parent b2051f86fa
commit 16fb91cf16
3 changed files with 78 additions and 55 deletions

2
config Normal file → Executable file
View File

@@ -5,7 +5,7 @@ export REDIS_ROOT=/var/lib/dokku/services/redis
export PLUGIN_COMMAND_PREFIX="redis"
export PLUGIN_DATA_ROOT=$REDIS_ROOT
export PLUGIN_DATASTORE_PORT=6379
export PLUGIN_DATASTORE_PORTS=(6379)
export PLUGIN_DEFAULT_ALIAS="REDIS"
export PLUGIN_IMAGE=$REDIS_IMAGE
export PLUGIN_IMAGE_VERSION=$REDIS_IMAGE_VERSION