rieter: add stack

master
Jef Roosens 2023-08-05 13:43:17 +02:00
parent 7224eba5a0
commit 1fec1828d1
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 51 additions and 0 deletions

51
stacks/rieter.yml 100644
View File

@ -0,0 +1,51 @@
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: