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

45 lines
1020 B
Django/Jinja

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}}
- POSTGRES_INITDB_ARGS='--encoding=UTF-8 --lc-collate=C --lc-ctype=C'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U matrix"]
interval: 10s
timeout: 5s
retries: 6
volumes:
database:
data:
networks:
default:
driver: bridge