ploughshares/stack.staging.yml

68 lines
1.9 KiB
YAML

networks:
traefik:
external: true
ploughshares-internal:
driver: overlay
services:
ploughshares-app:
image: 'git.nixc.us/colin/ploughshares:staging'
deploy:
replicas: 1
labels:
homepage.group: tools
homepage.name: Project Ploughshares (Staging)
homepage.href: https://staging-ploughshares.nixc.us/
homepage.description: Transaction Management System (Staging)
traefik.enable: "true"
traefik.http.routers.ploughshares-staging.rule: Host(`staging-ploughshares.nixc.us`)
traefik.http.routers.ploughshares-staging.entrypoints: websecure
traefik.http.routers.ploughshares-staging.tls: "true"
traefik.http.routers.ploughshares-staging.tls.certresolver: letsencryptresolver
traefik.http.services.ploughshares-staging.loadbalancer.server.port: 5001
traefik.docker.network: traefik
environment:
- FLASK_RUN_PORT=5001
- POSTGRES_HOST=ploughshares-db-staging
- POSTGRES_PORT=5432
- POSTGRES_DB=ploughshares
- POSTGRES_USER=ploughshares
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password_staging
networks:
- traefik
- ploughshares-internal
volumes:
- ploughshares_uploads_staging:/app/uploads
secrets:
- db_password_staging
depends_on:
- ploughshares-db-staging
ploughshares-db-staging:
image: postgres:12
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
environment:
- POSTGRES_DB=ploughshares
- POSTGRES_USER=ploughshares
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password_staging
networks:
- ploughshares-internal
volumes:
- ploughshares_db_data_staging:/var/lib/postgresql/data
secrets:
- db_password_staging
volumes:
ploughshares_db_data_staging:
driver: local
ploughshares_uploads_staging:
driver: local
secrets:
db_password_staging:
external: true