feat(07-04): update docker-compose.yml to reference config/ and remove inventory.env

This commit is contained in:
2026-04-23 12:52:17 +03:00
parent 225972b8d0
commit 9f267a5344

View File

@@ -10,15 +10,18 @@ services:
- inventory_net
ports:
- ${BACKEND_PORT:-8000}:8000
env_file:
- inventory.env
# [D-04] inventory.env deprecated — see config/ folder instead
# env_file:
# - inventory.env
volumes:
# [D-07] New config/ structure — YAML config mounted read-only
# Named volumes for data persistence
- backend_data:/app/data
- backend_logs:/app/logs
- ./config:/app/config:ro
- ./scripts:/app/scripts:ro
environment:
# [D-06] Environment variables override config/backend.yaml load order
- DATA_DIR=/app/data
- LOGS_DIR=/app/logs
# [C-01] JWT secret key — GENERATE A SECURE VALUE FOR PRODUCTION!
@@ -47,10 +50,13 @@ services:
- inventory_net
ports:
- ${FRONTEND_PORT:-3000}:3000
env_file:
- inventory.env
# [D-04] inventory.env deprecated — see config/ folder instead
# env_file:
# - inventory.env
volumes:
- frontend_logs:/app/logs
# [D-07] New config/ structure — YAML config mounted read-only
- ./config:/app/config:ro
# Write Next.js logs to both stdout (docker logs) and file (mapped volume)
command: sh -c "mkdir -p /app/logs && node server.js 2>&1 | tee -a /app/logs/frontend.log"
healthcheck:
@@ -82,10 +88,13 @@ services:
ports:
- ${BACKEND_SSL_PORT:-8918}:444
- ${FRONTEND_SSL_PORT:-8919}:443
env_file:
- inventory.env
# [D-04] inventory.env deprecated — see config/ folder instead
# env_file:
# - inventory.env
volumes:
- ./config/Caddyfile:/etc/caddy/Caddyfile:ro
# [D-07] New config/ structure — YAML config mounted read-only
- ./config:/app/config:ro
# Persist the internal Caddy certificates so users don't get new certificate warnings constantly
- caddy_data:/data
- caddy_config:/config