nextload/docker-compose.prod.yml

72 lines
1.9 KiB
YAML
Raw Normal View History

2024-06-05 20:13:00 +00:00
---
version: "3.8"
services:
2024-06-15 11:14:39 +00:00
nextjs:
2024-06-05 20:23:17 +00:00
image: git.autonomic.zone/autonomic-cooperative/nextload:latest
2024-07-13 15:26:48 +00:00
restart: unless-stopped
2024-06-05 20:13:00 +00:00
environment:
- "NAME=${STACK_NAME}"
- "PAYLOAD_SECRET_FILE=/run/secrets/payload_secret"
2024-06-24 16:00:44 +00:00
- "BASE_URL=nextload.swarm-demo.autonomic.zone"
2024-06-05 20:13:00 +00:00
- "MONGODB_USER=mongo"
- "MONGODB_HOST=${STACK_NAME}_mongo"
- "MONGODB_PORT=27017"
- "MONGODB_PASSWORD_FILE=/run/secrets/mongo_password"
- "REPOSITORY"
2024-06-18 21:36:00 +00:00
- "PORT=3000"
2024-06-18 17:51:59 +00:00
- "HOSTNAME=0.0.0.0"
2024-06-05 20:13:00 +00:00
secrets:
- mongo_password
- payload_secret
volumes:
- payload_uploads:/prod/.next/standalone/media
2024-06-05 20:13:00 +00:00
networks:
- proxy
- internal
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
2024-06-15 11:14:39 +00:00
- "traefik.http.services.${STACK_NAME}-nextload.loadbalancer.server.port=3000"
2024-06-05 20:13:00 +00:00
# FIXME switch to /admin probably using PathPrefix
2024-06-15 11:14:39 +00:00
- "traefik.http.routers.${STACK_NAME}-nextload.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}-nextload.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}-nextload.tls.certresolver=production"
2024-06-25 21:27:28 +00:00
depends_on:
- mongo
2024-06-05 20:13:00 +00:00
mongo:
image: mongo:6.0.5
restart: unless-stopped
volumes:
- mongo:/data/db
command:
- --storageEngine=wiredTiger
environment:
- "MONGO_INITDB_ROOT_USERNAME=mongo"
- "MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/mongo_password"
secrets:
- mongo_password
networks:
- internal
networks:
proxy:
external: true
internal:
secrets:
payload_secret:
external: true
name: ${STACK_NAME}_payload_secret_${SECRET_PAYLOAD_SECRET_VERSION}
mongo_password:
external: true
name: ${STACK_NAME}_mongo_password_${SECRET_MONGO_PASSWORD_VERSION}
volumes:
mongo:
payload_uploads: