docker/matrix/docker-compose.yml

56 lines
1.6 KiB
YAML
Raw Normal View History

2022-11-08 09:34:56 +01:00
version: "3.8"
services:
app:
image: matrixdotorg/synapse:v1.70.1
depends_on:
- db
expose:
- "8008"
restart: unless-stopped
networks:
- proxy
- default
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
- UID=1000
- GID=1000
volumes:
- ${DATA_PATH}/synapse:/data
env_file: secrets/app.secrets
healthcheck:
test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"]
interval: 15s
timeout: 5s
retries: 3
start_period: 5s
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.services.synapse-web-svc.loadbalancer.server.port=8008"
- "traefik.http.routers.synapse-https.service=synapse-web-svc"
- "traefik.http.middlewares.synapse-redirect-websecure.redirectscheme.scheme=https"
- "traefik.http.routers.synapse-http.middlewares=synapse-redirect-websecure"
- "traefik.http.routers.synapse-http.rule=Host(`${SYNAPSE_CN}`)"
- "traefik.http.routers.synapse-http.entrypoints=web"
- "traefik.http.routers.synapse-https.rule=Host(`${SYNAPSE_CN}`)"
- "traefik.http.routers.synapse-https.entrypoints=websecure"
- "traefik.http.routers.synapse-https.tls=true"
- "traefik.http.routers.synapse-https.tls.certresolver=myhttpchallenge"
db:
2022-11-29 11:37:12 +01:00
image: postgres:13.9-alpine
2022-11-08 09:34:56 +01:00
env_file: ./secrets/db.secrets
environment:
- LC_COLLATE=C
- LC_CTYPE=C
- LANG=fr_FR.UTF-8
restart: unless-stopped
volumes:
- ${DATA_PATH}/db/data:/var/lib/postgresql/data
- ${DATA_PATH}/db/.pgpass:/root/.pgpass
networks:
proxy:
external: true