2023-01-28 00:44:31 +01:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:15
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
|
|
|
volumes:
|
2023-02-23 09:22:26 +01:00
|
|
|
- /mnt/Main/redondant/shared/postgres:/var/lib/postgresql/data
|
2023-01-28 00:44:31 +01:00
|
|
|
networks:
|
|
|
|
- storage
|
|
|
|
secrets:
|
|
|
|
- postgres_password
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
restart_policy:
|
|
|
|
condition: any
|
|
|
|
max_attempts: 3
|
2023-02-03 23:48:45 +01:00
|
|
|
placement:
|
|
|
|
constraints:
|
2023-02-23 09:22:26 +01:00
|
|
|
- node.labels.STORAGE == true
|
2023-01-28 00:44:31 +01:00
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:latest
|
|
|
|
networks:
|
|
|
|
- storage
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
restart_policy:
|
|
|
|
condition: any
|
|
|
|
max_attempts: 3
|
2023-02-03 23:48:45 +01:00
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.labels.POWER == true
|
2023-01-28 00:44:31 +01:00
|
|
|
|
|
|
|
networks:
|
|
|
|
storage:
|
|
|
|
external: true
|
|
|
|
|
|
|
|
secrets:
|
|
|
|
postgres_password:
|
|
|
|
external: true
|