forked from mfallone/docker-compose-matrix-synapse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
81 lines (76 loc) · 1.99 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This compose file is compatible with Compose itself, it might need some
# adjustments to run properly with stack.
version: '3'
services:
synapse:
container_name: synapse
hostname: ${MATRIX_HOSTNAME}
build:
context: ../..
dockerfile: docker/Dockerfile
image: docker.io/matrixdotorg/synapse:latest
restart: unless-stopped
environment:
- SYNAPSE_SERVER_NAME=${MATRIX_HOSTNAME}
- SYNAPSE_REPORT_STATS=yes
- SYNAPSE_NO_TLS=1
#- SYNAPSE_ENABLE_REGISTRATION=no
#- SYNAPSE_CONFIG_PATH=/config
# - SYNAPSE_LOG_LEVEL=DEBUG
- SYNAPSE_REGISTRATION_SHARED_SECRET=${REG_SHARED_SECRET}
- POSTGRES_DB=synapse
- POSTGRES_HOST=db
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- synapse-data:/data
depends_on:
- db
# In order to expose Synapse, remove one of the following, you might for
# instance expose the TLS port directly:
# ports:
# - 8448:8448/tcp
networks:
- web
- backend
# ... or use a reverse proxy, here is an example for traefik:
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:${MATRIX_HOSTNAME}"
- "traefik.port=8008"
- "traefik.docker.network=web"
db:
container_name: postgres
image: docker.io/postgres:10-alpine
environment:
- POSTGRES_DB=synapse
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- backend
labels:
- "traefik.enable=false"
traefik:
image: traefik
container_name: traefik
command: --api --docker
ports:
- "80:80"
- "443:443"
- "8080:8080"
networks:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
restart:
always
volumes:
synapse-data:
postgres-data:
networks:
web:
backend: