Browse Source
new: store and keep compiled docker-compose and a mean to use-it for services.
new: store and keep compiled docker-compose and a mean to use-it for services.
The ``docker-compose.yml`` is saved along with an executable ``dc`` and ``.env`` in a directory to be shared as a volume in case we'd like to launch a subservice in the same setup from a launched service. For instance, a ``cron`` charm could want to launch ``run-once`` services. The charm only need to access the ``dc`` binary, this can be done by sharing the binary as a volume. This is the recommended way to do this: ``\${DOCKER_COMPOSE_PATH}/bin/dc:/bin/dc:ro``. Notice how we use a docker-compose level variable here as the DOCKER_COMPOSE_PATH will only be computed after all ``init`` hooks are done. This is the purpose of the ``.env`` file that is also generated. These directories are garbage collected if no containers have volumes connected to it.test
Valentin Lab
6 years ago
6 changed files with 115 additions and 6 deletions
-
108bin/compose-core
-
2test/action
-
3test/args
-
3test/base
-
3test/injection
-
2test/wget
Write
Preview
Loading…
Cancel
Save
Reference in new issue