fix: add Redis service and REDIS_URL to web container
This commit is contained in:
@@ -22,6 +22,26 @@ services:
|
||||
networks:
|
||||
- memento-network
|
||||
|
||||
# ============================================
|
||||
# Redis - Cache & Quota Tracking
|
||||
# ============================================
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: memento-redis
|
||||
restart: unless-stopped
|
||||
command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- memento-network
|
||||
|
||||
# ============================================
|
||||
# memento-note - Next.js Web Application
|
||||
# ============================================
|
||||
@@ -37,8 +57,8 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
# DATABASE_URL is auto-constructed from PostgreSQL credentials (not in .env.docker)
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-memento}:${POSTGRES_PASSWORD:-memento}@postgres:5432/${POSTGRES_DB:-memento}
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- NODE_ENV=production
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
# ADMIN_EMAIL comes from .env.docker via env_file directive above
|
||||
@@ -48,6 +68,8 @@ services:
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/',r=>process.exit(r.statusCode<500?0:1)).on('error',()=>process.exit(1))"]
|
||||
@@ -138,6 +160,8 @@ services:
|
||||
volumes:
|
||||
postgres-data:
|
||||
driver: local
|
||||
redis-data:
|
||||
driver: local
|
||||
uploads-data:
|
||||
driver: local
|
||||
backup-data:
|
||||
|
||||
Reference in New Issue
Block a user