- Create log directory in Dockerfile - Add proper logging configuration to default.conf - Mount logs directory in docker-compose.yml for persistence - Fixes 502 error caused by missing log directory
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
services:
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: deafgain-website-web-1
|
|
ports:
|
|
- "804:804"
|
|
depends_on:
|
|
- api
|
|
- redis
|
|
environment:
|
|
- NODE_ENV=production
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /docker/websites/deafgain/video_content:/usr/share/nginx/html/videos
|
|
- /docker/websites/deafgain/logs:/var/log/nginx/deafgain-website
|
|
networks:
|
|
- caddy_network
|
|
- default
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.api
|
|
container_name: deafgain-website-api-1
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
- GMAIL_USER=${GMAIL_USER}
|
|
- GMAIL_PASS=${GMAIL_PASS}
|
|
- REDIS_URL=redis://redis:6379
|
|
- REDIS_TOKEN=${REDIS_TOKEN}
|
|
restart: unless-stopped
|
|
networks:
|
|
- default
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: deafgain-website-redis-1
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- default
|
|
|
|
volumes:
|
|
redis_data:
|
|
|
|
networks:
|
|
caddy_network:
|
|
external: true
|