ArcticFoxes-Synapse-Docker-.../docker-compose.yml
2022-01-17 16:11:03 -05:00

78 lines
2.3 KiB
YAML

# This compose file is compatible with Compose itself, it might need some
# adjustments to run properly with stack.
version: '3'
services:
synapse:
image: docker.io/matrixdotorg/synapse:latest
# Since synapse does not retry to connect to the database, restart upon
# failure
restart: unless-stopped
container_name: synapse
# 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
# 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.
# - ./bridges:/bridges:Z
# Uncomment if you want to install the shared_secret_authenticator module. You have to go to https://github.com/devture/matrix-synapse-shared-secret-auth, download it and put it in ./modules. I am not redistributing it here because AGPL bad.
# - ./modules/shared_secret_authenticator.py:/usr/local/lib/python3.8/site-packages/shared_secret_authenticator.py:ro
depends_on:
- postgres
networks:
- matrix
postgres:
image: docker.io/postgres:alpine
restart: unless-stopped
container_name: postgres
# 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
networks:
- matrix
element:
image: vectorim/element-web:latest
restart: unless-stopped
container_name: element
volumes:
- ./element-config.json:/app/config.json:Z
networks:
- matrix
swag:
image: ghcr.io/linuxserver/swag
restart: unless-stopped
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- URL=yourdomain.tld
- SUBDOMAINS=synapse,element
- VALIDATION=http
- EMAIL=changeme@yourdomain.tld
- ONLY_SUBDOMAINS=true
volumes:
- ./swag:/config:Z
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 443:443
- 80:80
networks:
- matrix
networks:
matrix: