67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
networks:
|
|
traefik:
|
|
external: true
|
|
ploughshares-internal:
|
|
driver: overlay
|
|
|
|
services:
|
|
ploughshares-app:
|
|
image: 'git.nixc.us/colin/ploughshares:latest'
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.hostname == macmini14
|
|
labels:
|
|
homepage.group: tools
|
|
homepage.name: Project Ploughshares
|
|
homepage.href: https://ploughshares.nixc.us/
|
|
homepage.description: Transaction Management System
|
|
traefik.enable: "true"
|
|
|
|
traefik.http.routers.ploughshares.rule: Host(`ploughshares.nixc.us`)
|
|
traefik.http.routers.ploughshares.entrypoints: websecure
|
|
traefik.http.routers.ploughshares.tls: "true"
|
|
traefik.http.routers.ploughshares.tls.certresolver: letsencryptresolver
|
|
traefik.http.services.ploughshares.loadbalancer.server.port: 5001
|
|
traefik.docker.network: traefik
|
|
environment:
|
|
- FLASK_RUN_PORT=5001
|
|
- POSTGRES_HOST=ploughshares-db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_DB=ploughshares
|
|
- POSTGRES_USER=ploughshares
|
|
- POSTGRES_PASSWORD=ploughshares_password
|
|
- APP_DOMAIN=https://ploughshares.nixc.us
|
|
- APP_ENV=production
|
|
networks:
|
|
- traefik
|
|
- ploughshares-internal
|
|
volumes:
|
|
- ploughshares_uploads:/app/uploads
|
|
depends_on:
|
|
- ploughshares-db
|
|
|
|
ploughshares-db:
|
|
image: postgres:12
|
|
deploy:
|
|
replicas: 1
|
|
placement:
|
|
constraints:
|
|
- node.hostname == macmini14
|
|
environment:
|
|
- POSTGRES_DB=ploughshares
|
|
- POSTGRES_USER=ploughshares
|
|
- POSTGRES_PASSWORD=ploughshares_password
|
|
networks:
|
|
- ploughshares-internal
|
|
volumes:
|
|
- ploughshares_db_data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
ploughshares_db_data:
|
|
driver: local
|
|
ploughshares_uploads:
|
|
driver: local
|
|
|