44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: dsas-cca-backend
|
|
# Run as root to allow writing to volume-mounted cookies.json
|
|
# Alternative: Use named volume instead of bind mount
|
|
user: "0:0"
|
|
ports:
|
|
- "${PORT:-3000}:${PORT:-3000}"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
restart: unless-stopped
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "15m"
|
|
max-file: "3"
|
|
|
|
redis:
|
|
image: "redis:8.0-alpine"
|
|
container_name: dsas-cca-redis
|
|
command: redis-server --requirepass "dsas-cca"
|
|
volumes:
|
|
- ./redis_data:/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "dsas-cca", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "15m"
|
|
max-file: "3"
|