Move client-map to a directory bind-mount. Editing bind-mounted files (with vim) changes their inode

This commit is contained in:
2026-04-03 15:31:35 +02:00
parent 5f76c7b3b6
commit e2bf619249
5 changed files with 9 additions and 8 deletions

View File

@@ -36,10 +36,10 @@ topology:
kind: linux
image: git.ipng.ch/ipng/clab-webserver:latest
binds:
- client-map.yaml:/app/client-map.yaml:ro
- config:/app/config:ro
- docroot:/app/docroot:ro
env:
CLIENT_MAP: /app/client-map.yaml
CLIENT_MAP: /app/config/client-map.yaml
DOCROOT: /app/docroot
LISTEN: ":80"
ports:
@@ -143,11 +143,11 @@ All options can be set via CLI flag or environment variable. Flags take preceden
```sh
# Run directly
go run . -client-map client-map.yaml
go run . -client-map config/client-map.yaml
# Build and run
go build -o clab-webserver .
./clab-webserver -client-map client-map.yaml -listen :8080
./clab-webserver -client-map config/client-map.yaml -listen :8080
# Docker
docker compose build
@@ -221,6 +221,6 @@ them and returning a unique token they can record and submit.
### Deployment
- Packaged as a multi-stage Docker image based on Alpine.
- `docroot/` is baked into the image; `client-map.yaml` is expected as a bind mount.
- `docroot/` is baked into the image; `config/` (containing `client-map.yaml`) is expected as a bind-mounted directory.
- All configuration is available as both CLI flags and environment variables.
- Image: `git.ipng.ch/ipng/clab-webserver:latest`