59 lines
1.1 KiB
YAML
59 lines
1.1 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
CACHEBUST: ${CACHEBUST:-1}
|
|
pull_policy: build
|
|
restart: unless-stopped
|
|
ports:
|
|
- "801:801"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- VERSION=2.0
|
|
env_file:
|
|
- .env
|
|
- stack.env
|
|
volumes:
|
|
- uploads-data:/app/uploads
|
|
depends_on:
|
|
mongodb:
|
|
condition: service_healthy
|
|
networks:
|
|
- caddy_network
|
|
- internal
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:801/api/events"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
mongodb:
|
|
image: mongo:7.0
|
|
restart: unless-stopped
|
|
volumes:
|
|
- mongo-data:/data/db
|
|
networks:
|
|
- internal
|
|
env_file:
|
|
- stack.env
|
|
command: ["--auth", "--bind_ip_all"]
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping')"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
|
|
networks:
|
|
caddy_network:
|
|
external: true
|
|
internal:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
mongo-data:
|
|
name: mcdi-mongo-data
|
|
uploads-data:
|
|
name: mcdi-uploads-data
|