-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
element.yml
79 lines (74 loc) · 2.61 KB
/
element.yml
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
# DOMAIN=example.com docker stack deploy -c element.yml element
services:
web:
image: vectorim/riot-web:${VERSION:-v1.7.33}
command:
- /bin/sh
- -c
- |
sed -i -e 's#https://matrix-client.matrix.org#'$$SCHEME'://'$$DOMAIN'#g' /app/config.json
sed -i -e 's/matrix.org/'$$DOMAIN'/g' /app/config.json
sed -i -e 's/"breadcrumbs": true/"breadcrumbs": true,\n "language": "'$$LANGUAGE'"/g' /app/config.json
nginx -g 'daemon off;'
environment:
- DOMAIN=${DOMAIN:-element.localhost}
- SCHEME=${SCHEME:-https}
- LANGUAGE=${LANGUAGE:-fr_FR}
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.element-${NUMBER:-1}.rule=Host(`${DOMAIN:-element.localhost}`)
- traefik.http.routers.element-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.element-${NUMBER:-1}.service=element-${NUMBER:-1}
- traefik.http.routers.element-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.element-${NUMBER:-1}.loadbalancer.server.port=80
networks:
- traefik
- internal
synapse:
image: matrixdotorg/synapse:v1.35.1
entrypoint: /bin/sh
command:
- -c
- |
sed -i -e 's/#enable_registration: false/enable_registration: '$$ENABLE_REGISTRATION'/g' /data/homeserver.yaml
sed -i -e 's/log_config:/#log_config:/g' /data/homeserver.yaml
/start.py
environment:
- ENABLE_REGISTRATION=${ENABLE_REGISTRATION:-true}
volumes:
- ${VOLUME_PATH}synapse:/data
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.element-synapse-${NUMBER:-1}.rule=Host(`${DOMAIN:-element.localhost}`) && PathPrefix(`/_matrix`)
- traefik.http.routers.element-synapse-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.element-synapse-${NUMBER:-1}.service=element-synapse-${NUMBER:-1}
- traefik.http.routers.element-synapse-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.element-synapse-${NUMBER:-1}.loadbalancer.server.port=8008
networks:
- traefik
- internal
synapse-init:
image: matrixdotorg/synapse:v1.35.1
command: generate
volumes:
- ${VOLUME_PATH}synapse:/data
environment:
- SYNAPSE_SERVER_NAME=${DOMAIN:-element.localhost}
- SYNAPSE_REPORT_STATS=no
- SYNAPSE_NO_TLS=yes
deploy:
restart_policy:
condition: on-failure
networks:
- internal
volumes:
synapse:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net