docker/matrix/compose.yaml
2024-02-04 22:42:43 +01:00

78 lines
1.5 KiB
YAML

---
services:
matrix_install_site:
build: install_site
environment:
- BASE_URL=$MATRIX_BASE_URL
- EMAIL
volumes:
- ./nginx.conf:/web/matrix.conf
- sites:/sites/
- certs:/etc/letsencrypt/
- certbotroot:/var/www/certbot/
- /var/run/docker.sock:/var/run/docker.sock
coturn_install_site:
build: install_site
environment:
- BASE_URL=$COTURN_BASE_URL
- EMAIL
volumes:
- certs:/etc/letsencrypt/
- certbotroot:/var/www/certbot/
db:
image: docker.io/postgres:15
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data/
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
coturn:
build: coturn
network: host # TODO: https://github.com/instrumentisto/coturn-docker-image/issues/3
tmpfs:
- tmpfs:/var/lib/coturn/
environment:
- BASE_URL=COTURN_BASE_URL
- AUTH_SECRET
synapse:
build: synapse
restart: unless-stopped
volumes:
- config:/config/
- data:/data/
environment:
- SYNAPSE_SERVER_NAME=$SYNAPSE_BASE_URL
- SYNAPSE_CONFIG_DIR=/config
- SYNAPSE_DATA_DIR=/data
- UID=$PUID
- GID=$PGID
- COTURN_BASE_URL
- AUTH_SECRET
networks:
- nginx
- default
depends_on:
- db
volumes:
sites:
external: true
certs:
external: true
certbotroot:
external: true
db:
config:
data:
networks:
nginx:
external: true