2023-01-24 11:39:33 +00:00
|
|
|
---
|
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
|
|
|
app:
|
|
|
|
image: decentral1se/kios-admin:latest
|
|
|
|
networks:
|
|
|
|
- proxy
|
2023-01-24 12:18:39 +00:00
|
|
|
- internal
|
2023-01-24 11:39:33 +00:00
|
|
|
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
|
2023-01-24 12:18:39 +00:00
|
|
|
PAYLOAD_CONFIG_PATH: /home/node/dist/payload.config.js
|
2023-01-24 13:59:12 +00:00
|
|
|
PAYLOAD_PUBLIC_SERVER_URL: https://kios-admin.lumbung.space
|
2023-01-24 11:39:33 +00:00
|
|
|
configs:
|
|
|
|
- source: app_entrypoint
|
|
|
|
target: /docker-entrypoint.sh
|
|
|
|
mode: 0555
|
2023-01-24 12:18:39 +00:00
|
|
|
entrypoint: /docker-entrypoint.sh
|
|
|
|
command: node dist/server.js
|
2023-01-24 11:39:33 +00:00
|
|
|
secrets:
|
|
|
|
- payload_secret
|
|
|
|
deploy:
|
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2023-01-24 12:20:25 +00:00
|
|
|
- "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"
|
2023-01-24 11:39:33 +00:00
|
|
|
|
|
|
|
db:
|
|
|
|
image: mongo:6.0.3
|
2023-01-24 12:18:39 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
2023-01-24 11:39:33 +00:00
|
|
|
command:
|
|
|
|
- "--storageEngine=wiredTiger"
|
|
|
|
volumes:
|
|
|
|
- data:/data/db
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
app:
|
|
|
|
node_modules:
|
|
|
|
data:
|
|
|
|
|
|
|
|
networks:
|
2023-01-24 12:18:39 +00:00
|
|
|
internal:
|
2023-01-24 11:39:33 +00:00
|
|
|
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
|