[MATRIX] Add new service

This commit is contained in:
thopic 2022-11-08 09:34:56 +01:00
parent fd739e7869
commit 86a74e6a17
Signed by: thopic
GPG Key ID: 292DBBF0B54AD4C5
4 changed files with 60 additions and 0 deletions

2
matrix/.env.example Normal file
View File

@ -0,0 +1,2 @@
DATA_PATH=
SYNAPSE_CN=

55
matrix/docker-compose.yml Normal file
View File

@ -0,0 +1,55 @@
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:
image: postgres:13.4-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

View File

View File

@ -0,0 +1,3 @@
POSTGRES_USER=
POSTGRES_DB=
POSTGRES_PASSWORD=