deployment/stacks/rieter.yml

52 lines
1.1 KiB
YAML
Raw Normal View History

2023-08-05 13:43:17 +02:00
version: '3.4'
services:
app:
image: 'git.rustybever.be/chewing_bever/rieter:dev'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class.rieter==true'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.rieter.rule=Host(`arch2.r8r.be`)'
- 'traefik.http.routers.rieter.tls=true'
- 'traefik.http.routers.rieter.tls.certresolver=letsEncrypt'
- 'traefik.http.services.rieter.loadbalancer.server.port=8000'
environment:
- 'RIETER_DATABASE_URL=postgres://rieter:rieter@db:5432/rieter'
- 'RIETER_API_KEY'
networks:
- 'public'
volumes:
- 'data:/data'
db:
image: 'postgres:15.3-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class.rieter==true'
environment:
- 'POSTGRES_DB=rieter'
- 'POSTGRES_USER=rieter'
- 'POSTGRES_PASSWORD=rieter'
volumes:
- 'db-data:/var/lib/postgresql/data'
networks:
public:
external: true
volumes:
data:
db-data: