2022-01-13 15:22:49 +00:00
# This compose file is compatible with Compose itself, it might need some
# adjustments to run properly with stack.
version : '3'
services :
synapse :
2022-09-06 15:46:03 +00:00
# Use docker.io/matrixdotorg/synapse:latest if you want the official image (without the Mjolnir module).
2022-11-16 06:36:26 +00:00
image : ghcr.io/tommytran732/synapse:latest
2022-01-13 15:22:49 +00:00
# Since synapse does not retry to connect to the database, restart upon
# failure
2022-01-13 15:40:59 +00:00
container_name : synapse
2022-11-25 03:41:53 +00:00
restart : unless-stopped
2022-09-06 15:46:03 +00:00
# Comment out the next line if you are using the official image.
user : "991:991"
2022-01-13 15:22:49 +00:00
# See the readme for a full documentation of the environment settings
# NOTE: You must edit homeserver.yaml to use postgres, it defaults to sqlite
environment :
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
volumes :
- ./files:/data:Z
2022-01-17 21:03:56 +00:00
# Uncomment if you want to install appservices. The registration files should go into ./bridges, and in your homeserver.yaml specify that it should install the appservices in /bridges.
2022-01-17 21:11:03 +00:00
# - ./bridges:/bridges:Z
2022-01-13 15:22:49 +00:00
depends_on :
2022-01-13 15:40:32 +00:00
- postgres
2022-01-13 15:26:55 +00:00
networks :
2022-01-13 16:03:12 +00:00
- matrix
2022-11-23 11:33:10 +00:00
- postgres
2022-09-11 20:27:22 +00:00
security_opt :
- no -new-privileges:true
cap_drop :
- ALL
2022-01-13 15:22:49 +00:00
2022-01-13 15:40:32 +00:00
postgres :
2022-11-18 09:39:33 +00:00
image : docker.io/postgres-15:alpine
2022-01-13 15:40:32 +00:00
container_name : postgres
2022-11-25 03:41:53 +00:00
restart : unless-stopped
2022-01-13 15:22:49 +00:00
# Change that password, of course!
environment :
- POSTGRES_USER=synapse
- POSTGRES_PASSWORD=changeme
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes :
- ./schemas:/var/lib/postgresql/data:Z
2022-01-13 15:26:55 +00:00
networks :
2022-11-23 11:33:10 +00:00
- postgres
2022-12-01 04:04:33 +00:00
healthcheck :
test : [ "CMD" , "pg_isready" , "-U" , "synapse" ]
interval : 15s
timeout : 5s
2022-10-17 08:37:18 +00:00
#user: "70:70"
#read_only: true
#security_opt:
# - no-new-privileges:true
#cap_drop:
# - ALL
#tmpfs:
# - /var/run/postgresql:size=50M,mode=0770,uid=70,gid=70,noexec,nosuid,nodev
2022-11-18 09:39:33 +00:00
shm_size : 1g
2022-01-13 15:26:55 +00:00
2022-01-13 15:40:32 +00:00
element :
2022-01-13 16:02:06 +00:00
image : vectorim/element-web:latest
2022-01-13 15:40:32 +00:00
container_name : element
2022-11-25 03:41:53 +00:00
restart : unless-stopped
2022-01-13 16:03:39 +00:00
volumes :
2022-09-13 18:40:42 +00:00
- ./element/config.json:/app/config.json:Z
2022-01-13 15:40:32 +00:00
networks :
2022-11-23 11:33:10 +00:00
- element
2022-09-13 18:40:42 +00:00
read_only : true
2022-09-11 20:27:22 +00:00
security_opt :
- no -new-privileges:true
cap_drop :
- ALL
cap_add :
- CHOWN
- SETGID
- SETUID
2023-03-15 21:09:51 +00:00
- CAP_NET_BIND_SERVICE
2022-09-13 18:40:42 +00:00
tmpfs :
- /var/run:size=50M,mode=0770,noexec,nosuid,nodev
- /var/cache/nginx:size=50M,mode=0770,noexec,nosuid,nodev
2022-01-13 15:40:32 +00:00
2023-03-17 03:01:27 +00:00
matrix-to :
image : ghcr.io/tommytran732/matrix.to
container_name : matrix-to
restart : unless-stopped
networks :
- matrix-to
user : 992 : 992
security_opt :
- no -new-privileges:true
- label:disable
cap_drop :
- ALL
2022-01-13 15:26:55 +00:00
swag :
image : ghcr.io/linuxserver/swag
container_name : swag
2022-11-25 03:41:53 +00:00
restart : unless-stopped
2022-01-13 15:26:55 +00:00
environment :
- PUID=1000
- PGID=1000
2022-01-13 16:50:31 +00:00
- URL=yourdomain.tld
2022-01-15 15:45:33 +00:00
- SUBDOMAINS=synapse,element
2022-01-13 15:26:55 +00:00
- VALIDATION=http
2022-01-13 16:50:31 +00:00
- EMAIL=changeme@yourdomain.tld
2022-01-13 15:26:55 +00:00
- ONLY_SUBDOMAINS=true
volumes :
- ./swag:/config:Z
- /etc/localtime:/etc/localtime:ro
ports :
- 443 : 443
- 80 : 80
2023-03-16 11:44:05 +00:00
- 8448 : 8448
2022-01-13 15:26:55 +00:00
networks :
2022-01-13 16:03:12 +00:00
- matrix
2022-11-23 11:33:10 +00:00
- element
- mjolnir
2022-11-25 12:21:12 +00:00
security_opt :
- no -new-privileges:true
2022-11-30 09:03:55 +00:00
cap_add :
- NET_ADMIN
2022-01-13 16:30:41 +00:00
2022-07-01 04:15:15 +00:00
pantalaimon :
2022-07-04 17:37:35 +00:00
image : matrixdotorg/pantalaimon:latest
2022-07-01 04:15:15 +00:00
container_name : pantalaimon
restart : unless-stopped
volumes :
- ./pantalaimon:/data:Z
depends_on :
- synapse
networks :
2022-11-23 11:33:10 +00:00
- pantalaimon
2022-09-13 18:40:42 +00:00
read_only : true
2022-09-11 20:27:22 +00:00
security_opt :
- no -new-privileges:true
cap_drop :
- ALL
2022-07-01 04:15:15 +00:00
2022-07-01 03:41:55 +00:00
mjolnir :
image : matrixdotorg/mjolnir:latest
container_name : mjolnir
2022-07-01 04:15:15 +00:00
restart : unless-stopped
2022-07-01 03:41:55 +00:00
volumes :
- ./mjolnir:/data:Z
2022-07-01 04:15:15 +00:00
depends_on :
- pantalaimon
networks :
2022-11-23 11:33:10 +00:00
- pantalaimon
- mjolnir
2022-09-13 18:40:42 +00:00
read_only : true
2022-09-11 20:27:22 +00:00
security_opt :
- no -new-privileges:true
cap_drop :
- ALL
2022-07-01 04:15:15 +00:00
2022-01-13 16:30:41 +00:00
networks :
matrix :
2022-11-23 11:33:10 +00:00
postgres :
element :
pantalaimon :
mjolnir :