50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: matrixdotorg/synapse:v1.83.0
|
|
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-svc.loadbalancer.server.port=8008"
|
|
- "traefik.http.routers.synapse.service=synapse-svc"
|
|
- "traefik.http.routers.synapse.entrypoints=websecure"
|
|
- "traefik.http.routers.synapse.rule=Host(`${SYNAPSE_CN}`)"
|
|
|
|
db:
|
|
image: postgres:13.11-alpine
|
|
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
|