With DataBaseREdis

This commit is contained in:
2026-01-28 00:49:37 +03:00
parent 4b01c2d4de
commit af62de5569
10 changed files with 1309 additions and 24 deletions

View File

@ -1,6 +1,23 @@
version: '3.8'
services:
redis:
image: redis:7-alpine
container_name: star-wars-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes
restart: unless-stopped
networks:
- star-wars-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
star-wars-game:
build:
context: .
@ -11,7 +28,13 @@ services:
environment:
- NODE_ENV=production
- PORT=3542
- USE_REDIS=${USE_REDIS:-true}
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
- SESSION_SECRET=${SESSION_SECRET:-star-wars-hearthstone-secret-key-change-in-production}
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
networks:
- star-wars-network
healthcheck:
@ -21,6 +44,9 @@ services:
retries: 3
start_period: 5s
volumes:
redis-data:
networks:
star-wars-network:
driver: bridge