docker/matrix/compose.yaml
2023-09-17 21:54:10 +02:00

61 lines
1.1 KiB
YAML

---
services:
install_site:
build: install_site
environment:
- 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
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
matrix:
image: docker.io/matrixdotorg/synapse:latest
restart: unless-stopped
volumes:
- config:/config/
- data:/data/
environment:
- SYNAPSE_SERVER_NAME=$BASE_URL
- SYNAPSE_CONFIG_DIR=/config
- SYNAPSE_DATA_DIR=/data
- POSTGRES_HOST=db
- UID=$PUID
- GID=$PGID
env_file:
- .env
networks:
- nginx
- default
depends_on:
- db
volumes:
sites:
external: true
certs:
external: true
certbotroot:
external: true
db:
config:
data:
networks:
nginx:
external: true