olimp/roles/matrix/templates/docker-compose.yml.j2
Administrator 1b4cb67ed6 Update 4 files
- /group_vars/all.yml
- /roles/matrix/tasks/main.yml
- /roles/matrix/templates/docker-compose.yml.j2
- /vault.yml
2025-10-23 11:36:51 +00:00

47 lines
1.3 KiB
Django/Jinja

version: '3.8'
services:
matrix-postgres:
image: postgres:13
container_name: matrix-postgres
restart: unless-stopped
environment:
POSTGRES_USER: {{ matrix_postgres_user }}
POSTGRES_PASSWORD: {{ matrix_postgres_password }}
POSTGRES_DB: {{ matrix_postgres_db }}
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --lc-collate=C --lc-ctype=C"
volumes:
- {{ matrix_postgres_dir }}:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U {{ matrix_postgres_user }}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- matrix-network
matrix-synapse:
image: matrixdotorg/synapse:latest
container_name: matrix-synapse
restart: unless-stopped
ports:
- "{{ matrix_port }}:8008"
volumes:
- {{ matrix_config_dir }}:/data
- {{ matrix_media_dir }}:/data/media
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
depends_on:
matrix-postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
interval: 15s
timeout: 5s
retries: 3
networks:
- matrix-network
networks:
matrix-network:
driver: bridge