45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: wedding-rsvp-nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
depends_on:
|
|
- wedding-rsvp
|
|
restart: unless-stopped
|
|
networks:
|
|
- wedding-network
|
|
|
|
wedding-rsvp:
|
|
build: .
|
|
container_name: wedding-rsvp-app
|
|
expose:
|
|
- "3000"
|
|
volumes:
|
|
- ./data:/app/data
|
|
environment:
|
|
- NODE_ENV=production
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
- GOOGLE_SHEETS_WEBHOOK_URL=${GOOGLE_SHEETS_WEBHOOK_URL}
|
|
- SMTP_HOST=${SMTP_HOST}
|
|
- SMTP_PORT=${SMTP_PORT}
|
|
- SMTP_USER=${SMTP_USER}
|
|
- SMTP_PASS=${SMTP_PASS}
|
|
- NOTIFICATION_EMAIL=${NOTIFICATION_EMAIL}
|
|
restart: unless-stopped
|
|
networks:
|
|
- wedding-network
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (res) =\u003e { process.exit(res.statusCode === 200 ? 0 : 1) })\""]
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
networks:
|
|
wedding-network:
|
|
driver: bridge |