stack-orchestrator/stack_orchestrator
Thomas E Lackey 6087e1cd31 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: cerc-io/stack-orchestrator#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>
2024-08-10 02:32:21 +00:00
..
build Fixes for external stack deployment (#851) 2024-07-09 15:37:35 +00:00
data Allow gentx-files to be omitted 2024-08-07 14:11:06 -06:00
deploy Copy config under a volume for Docker (similar to a ConfigMap for K8S). (#914) 2024-08-10 02:32:21 +00:00
repos Fixes for external stack deployment (#851) 2024-07-09 15:37:35 +00:00
__init__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
__main__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
base.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
command_types.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
constants.py Support multiple NodePorts, static NodePort mapping, and add 'replicas' spec option (#913) 2024-08-09 02:32:06 +00:00
main.py Add external stack support (#806) 2024-04-18 21:22:47 +00:00
opts.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
update.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
util.py Fix stack path check (#877) 2024-07-19 17:16:40 +00:00
version.py Fixes for external stack deployment (#851) 2024-07-09 15:37:35 +00:00