fix: use valid Redis log levels and add log level comments to all containers
All checks were successful
Deploy to Staging / Build Images (push) Successful in 33s
Deploy to Staging / Deploy to Staging (push) Successful in 22s
Deploy to Staging / Verify Staging (push) Successful in 8s
Deploy to Staging / Notify Staging Ready (push) Successful in 8s
Deploy to Staging / Notify Staging Failure (push) Has been skipped

Redis only supports debug|verbose|notice|warning -- not info or error.
The command was using ${LOG_LEVEL:-info} which resolved to INFO in
production (from workflow env), causing Redis to crash loop. Hardcode
the correct Redis-native levels (debug for dev, warning for prod) and
add available log level comments above every container's log setting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-02-08 21:27:33 -06:00
parent c6b99ab29a
commit 4412700e12
3 changed files with 18 additions and 8 deletions

View File

@@ -12,9 +12,11 @@ services:
# Traefik - Production log level and dashboard auth # Traefik - Production log level and dashboard auth
mvp-traefik: mvp-traefik:
environment: environment:
# Traefik log levels: TRACE | DEBUG | INFO | WARN | ERROR
LOG_LEVEL: error LOG_LEVEL: error
command: command:
- --configFile=/etc/traefik/traefik.yml - --configFile=/etc/traefik/traefik.yml
# Traefik log levels: TRACE | DEBUG | INFO | WARN | ERROR
- --log.level=ERROR - --log.level=ERROR
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
@@ -30,6 +32,7 @@ services:
NODE_ENV: production NODE_ENV: production
CONFIG_PATH: /app/config/production.yml CONFIG_PATH: /app/config/production.yml
SECRETS_DIR: /run/secrets SECRETS_DIR: /run/secrets
# Pino log levels: trace | debug | info | warn | error | fatal
LOG_LEVEL: error LOG_LEVEL: error
DATABASE_HOST: mvp-postgres DATABASE_HOST: mvp-postgres
REDIS_HOST: mvp-redis REDIS_HOST: mvp-redis
@@ -41,6 +44,7 @@ services:
# OCR - Production log level + engine config # OCR - Production log level + engine config
mvp-ocr: mvp-ocr:
environment: environment:
# Python log levels: DEBUG | INFO | WARNING | ERROR | CRITICAL
LOG_LEVEL: error LOG_LEVEL: error
REDIS_HOST: mvp-redis REDIS_HOST: mvp-redis
REDIS_PORT: 6379 REDIS_PORT: 6379
@@ -59,13 +63,14 @@ services:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
POSTGRES_INITDB_ARGS: --encoding=UTF8 POSTGRES_INITDB_ARGS: --encoding=UTF8
LOG_LEVEL: error LOG_LEVEL: error
# PostgreSQL log statements: none | ddl | mod | all
POSTGRES_LOG_STATEMENT: none POSTGRES_LOG_STATEMENT: none
# Minimum query duration to log: -1 (disabled) | 0 (all) | N (ms threshold)
POSTGRES_LOG_MIN_DURATION_STATEMENT: -1 POSTGRES_LOG_MIN_DURATION_STATEMENT: -1
PGDATA: /var/lib/postgresql/data/pgdata PGDATA: /var/lib/postgresql/data/pgdata
# Redis - Remove dev ports, production log level # Redis - Remove dev ports, production log level
mvp-redis: mvp-redis:
ports: [] ports: []
command: redis-server --appendonly yes --loglevel ${LOG_LEVEL:-info} # Redis log levels: debug | verbose | notice | warning
environment: command: redis-server --appendonly yes --loglevel warning
LOG_LEVEL: error

View File

@@ -64,6 +64,7 @@ services:
image: ${OCR_IMAGE:-git.motovaultpro.com/egullickson/ocr:latest} image: ${OCR_IMAGE:-git.motovaultpro.com/egullickson/ocr:latest}
container_name: mvp-ocr-staging container_name: mvp-ocr-staging
environment: environment:
# Python log levels: DEBUG | INFO | WARNING | ERROR | CRITICAL
LOG_LEVEL: debug LOG_LEVEL: debug
REDIS_HOST: mvp-redis REDIS_HOST: mvp-redis
REDIS_PORT: 6379 REDIS_PORT: 6379
@@ -79,7 +80,7 @@ services:
mvp-postgres: mvp-postgres:
container_name: mvp-postgres-staging container_name: mvp-postgres-staging
volumes: volumes:
- mvp_postgres_staging_data:/var/lib/postgresql/data - mvp_postgres_staging_data:/var/lib/postgresql/data/pgdata
- ./secrets/app/postgres-password.txt:/run/secrets/postgres-password:ro - ./secrets/app/postgres-password.txt:/run/secrets/postgres-password:ro
# ======================================== # ========================================

View File

@@ -11,6 +11,7 @@ services:
command: command:
- --configFile=/etc/traefik/traefik.yml - --configFile=/etc/traefik/traefik.yml
environment: environment:
# Traefik log levels: TRACE | DEBUG | INFO | WARN | ERROR
LOG_LEVEL: debug LOG_LEVEL: debug
CLOUDFLARE_DNS_API_TOKEN_FILE: /run/secrets/cloudflare-dns-token CLOUDFLARE_DNS_API_TOKEN_FILE: /run/secrets/cloudflare-dns-token
ports: ports:
@@ -113,6 +114,7 @@ services:
NODE_ENV: production NODE_ENV: production
CONFIG_PATH: /app/config/production.yml CONFIG_PATH: /app/config/production.yml
SECRETS_DIR: /run/secrets SECRETS_DIR: /run/secrets
# Pino log levels: trace | debug | info | warn | error | fatal
LOG_LEVEL: debug LOG_LEVEL: debug
# Service references # Service references
DATABASE_HOST: mvp-postgres DATABASE_HOST: mvp-postgres
@@ -189,6 +191,7 @@ services:
container_name: mvp-ocr container_name: mvp-ocr
restart: unless-stopped restart: unless-stopped
environment: environment:
# Python log levels: DEBUG | INFO | WARNING | ERROR | CRITICAL
LOG_LEVEL: debug LOG_LEVEL: debug
REDIS_HOST: mvp-redis REDIS_HOST: mvp-redis
REDIS_PORT: 6379 REDIS_PORT: 6379
@@ -231,11 +234,13 @@ services:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
POSTGRES_INITDB_ARGS: --encoding=UTF8 POSTGRES_INITDB_ARGS: --encoding=UTF8
LOG_LEVEL: debug LOG_LEVEL: debug
# PostgreSQL log statements: none | ddl | mod | all
POSTGRES_LOG_STATEMENT: all POSTGRES_LOG_STATEMENT: all
# Minimum query duration to log: -1 (disabled) | 0 (all) | N (ms threshold)
POSTGRES_LOG_MIN_DURATION_STATEMENT: 0 POSTGRES_LOG_MIN_DURATION_STATEMENT: 0
PGDATA: /var/lib/postgresql/data/pgdata PGDATA: /var/lib/postgresql/data/pgdata
volumes: volumes:
- mvp_postgres_data:/var/lib/postgresql/data - mvp_postgres_data:/var/lib/postgresql/data/pgdata
# Secrets (K8s Secrets equivalent) # Secrets (K8s Secrets equivalent)
- ./secrets/app/postgres-password.txt:/run/secrets/postgres-password:ro - ./secrets/app/postgres-password.txt:/run/secrets/postgres-password:ro
networks: networks:
@@ -259,9 +264,8 @@ services:
image: ${REGISTRY_MIRRORS:-git.motovaultpro.com/egullickson/mirrors}/redis:8.4-alpine image: ${REGISTRY_MIRRORS:-git.motovaultpro.com/egullickson/mirrors}/redis:8.4-alpine
container_name: mvp-redis container_name: mvp-redis
restart: unless-stopped restart: unless-stopped
command: redis-server --appendonly yes --loglevel ${LOG_LEVEL:-info} # Redis log levels: debug | verbose | notice | warning
environment: command: redis-server --appendonly yes --loglevel debug
LOG_LEVEL: debug
volumes: volumes:
- mvp_redis_data:/data - mvp_redis_data:/data
networks: networks: