computer-playbook/roles/docker-matrix/templates/docker-compose.yml.j2

45 lines
1000 B
Plaintext
Raw Normal View History

2023-12-12 22:36:35 +01:00
version: '3.1'
services:
application:
image: matrixdotorg/synapse:latest
restart: unless-stopped
logging:
driver: journald
volumes:
- data:/data
- ./homeserver.yaml:/data/homeserver.yaml:ro
- ./{{domain}}.log.config:/data/{{domain}}.log.config:ro
environment:
- SYNAPSE_SERVER_NAME={{domain}}
- SYNAPSE_REPORT_STATS=no
ports:
- "127.0.0.1:{{http_port}}:8008"
depends_on:
- database
database:
logging:
driver: journald
image: postgres:alpine
restart: unless-stopped
volumes:
- database:/var/lib/postgresql/data
environment:
- POSTGRES_DB=matrix
- POSTGRES_USER=matrix
- POSTGRES_PASSWORD={{matrix_database_password}}
2023-12-13 00:46:50 +01:00
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
2023-12-12 22:36:35 +01:00
healthcheck:
test: ["CMD-SHELL", "pg_isready -U matrix"]
interval: 10s
timeout: 5s
retries: 6
volumes:
database:
data:
networks:
default:
driver: bridge