feat(config): add configurable check-in date restriction and persistent logging

- Add ENABLE_CHECKIN_DATE_RESTRICTION environment variable to allow flexible check-in testing
- Replace NODE_ENV check with configurable flag in check-in validation logic
- Implement persistent logging with external Docker volumes (slc_logs_prod)
- Configure backend-prod and nginx-prod to write logs to /var/log/app/ and /var/log/nginx-app/
- Increase log rotation limits (50MB, 10 files) for better debugging
- Update .env.example files with new check-in configuration
This commit is contained in:
Radosław Gierwiało
2025-12-06 18:24:16 +01:00
parent 1ff70a9f7f
commit 819ac3a49b
4 changed files with 25 additions and 8 deletions

View File

@@ -34,15 +34,17 @@ services:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d.prod:/etc/nginx/conf.d:ro
- ./ssl:/etc/nginx/ssl:ro
- app_logs_prod:/var/log/nginx-app
ports:
- "80:80"
- "443:443"
restart: always
command: ["/bin/sh", "-c", "nginx -g 'daemon off;' 2>&1 | tee -a /var/log/nginx-app/nginx.log"]
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
max-size: "50m"
max-file: "10"
deploy:
resources:
limits:
@@ -175,13 +177,15 @@ services:
- LOG_LEVEL=warn
depends_on:
- db-prod
command: ["node", "src/server.js"]
command: ["sh", "-c", "node src/server.js 2>&1 | tee -a /var/log/app/backend.log"]
restart: always
volumes:
- app_logs_prod:/var/log/app
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
max-size: "50m"
max-file: "10"
deploy:
resources:
limits:
@@ -248,6 +252,9 @@ volumes:
postgres_data_prod:
external: true
name: slc_postgres_prod_data
app_logs_prod:
external: true
name: slc_logs_prod
networks:
slc_network: