65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- NODE_ENV=production
|
|
- MONGODB_URI=${MONGODB_URI}
|
|
container_name: stripstream-app
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3020:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- MONGODB_URI=${MONGODB_URI}
|
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
|
- NEXTAUTH_URL=${NEXTAUTH_URL}
|
|
- AUTH_TRUST_HOST=true
|
|
depends_on:
|
|
- mongodb
|
|
networks:
|
|
- stripstream-network
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1"
|
|
memory: 1G
|
|
labels:
|
|
- "com.centurylinklabs.watchtower.enable=false"
|
|
healthcheck:
|
|
test:
|
|
["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
mongodb:
|
|
image: mongo:latest
|
|
container_name: stripstream-mongodb
|
|
restart: unless-stopped
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
|
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
|
|
volumes:
|
|
- stripstream_mongodb_data:/data/db
|
|
networks:
|
|
- stripstream-network
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.5"
|
|
memory: 512M
|
|
ports:
|
|
- "27017:27017"
|
|
command: ["mongod", "--auth", "--bind_ip_all"]
|
|
|
|
networks:
|
|
stripstream-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
stripstream_mongodb_data:
|