lumbung-kios-cms/compose.yml

68 lines
1.6 KiB
YAML

---
version: "3.8"
services:
app:
image: decentral1se/kios-admin:latest
networks:
- proxy
- internal
volumes:
- app:/home/node/app
- node_modules:/home/node/app/node_modules
environment:
MONGODB_URI: mongodb://db:27017/payload
PORT: 3000
NODE_ENV: production
PAYLOAD_SECRET_FILE: /run/secrets/payload_secret
PAYLOAD_CONFIG_PATH: /home/node/dist/payload.config.js
PAYLOAD_PUBLIC_SERVER_URL: https://kios-admin.lumbung.space
configs:
- source: app_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
command: node dist/server.js
secrets:
- payload_secret
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.routers.kios-admin.rule=Host(`kios-admin.lumbung.space`, `www.kios-admin.lumbung.space`)"
- "traefik.http.routers.kios-admin.entrypoints=web-secure"
- "traefik.http.services.kios-admin.loadbalancer.server.port=3000"
- "traefik.http.routers.kios-admin.tls.certresolver=production"
db:
image: mongo:6.0.3
networks:
- internal
command:
- "--storageEngine=wiredTiger"
volumes:
- data:/data/db
volumes:
app:
node_modules:
data:
networks:
internal:
proxy:
external: true
secrets:
payload_secret:
external: true
name: ${STACK_NAME}_payload_secret_${SECRET_PAYLOAD_SECRET_VERSION}
configs:
app_entrypoint:
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang