Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy config under a volume for Docker (similar to a ConfigMap for K8S…
…). (#914) This emulates the K8S ConfigMap behavior on Docker by using a regular volume. If a directory exists under `config/` which matches a named volume, the contents will be copied to the volume on `create` (provided the destination volume is empty). That is, rather than a ConfigMap, it is essentially a "config volume". For example, with a compose file like: ``` version: '3.7' services: caddy: image: cerc/caddy-ethcache:local restart: always volumes: - caddyconfig:/etc/caddy:ro volumes: caddyconfig: ``` And a directory: ``` ❯ ls stack-orchestrator/config/caddyconfig/ Caddyfile ``` After `laconic-so deploy create --spec-file caddy.yml --deployment-dir /srv/caddy` there will be: ``` ❯ ls /srv/caddy/data/caddyconfig Caddyfile ``` Mounted at `/etc/caddy` Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/914 Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to> Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com> Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
- Loading branch information