74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
services:
|
|
nextjs:
|
|
image: git.autonomic.zone/autonomic-cooperative/nextload:latest
|
|
environment:
|
|
- "NAME=${STACK_NAME}"
|
|
- "PAYLOAD_URL" # Probably vestigial
|
|
- "PAYLOAD_SECRET_FILE=/run/secrets/payload_secret"
|
|
- "MONGODB_USER=mongo"
|
|
- "MONGODB_HOST=${STACK_NAME}_mongo"
|
|
- "MONGODB_PORT=27017"
|
|
- "MONGODB_PASSWORD_FILE=/run/secrets/mongo_password"
|
|
- "TOKEN_FILE=/run/secrets/token" # Probably vestigial
|
|
- "DRONE_URL" # Probably vestigial
|
|
- "REPOSITORY"
|
|
secrets:
|
|
- mongo_password
|
|
- payload_secret
|
|
- token # Probably vestigial
|
|
volumes:
|
|
- payload_uploads:/prod/dist/media
|
|
networks:
|
|
- proxy
|
|
- internal
|
|
deploy:
|
|
update_config:
|
|
failure_action: rollback
|
|
order: start-first
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.${STACK_NAME}-nextload.loadbalancer.server.port=3000"
|
|
# FIXME switch to /admin probably using PathPrefix
|
|
- "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"
|
|
|
|
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}
|
|
token:
|
|
external: true
|
|
name: ${STACK_NAME}_token_${SECRET_TOKEN_VERSION}
|
|
mongo_password:
|
|
external: true
|
|
name: ${STACK_NAME}_mongo_password_${SECRET_MONGO_PASSWORD_VERSION}
|
|
|
|
volumes:
|
|
mongo:
|
|
html_content:
|
|
payload_uploads:
|