deployment/stacks/matrix.yml

216 lines
4.6 KiB
YAML

# Conduit - Behind Traefik Reverse Proxy
version: '3.4'
services:
# ====MATRIX SERVER=====
conduit:
image: 'matrixconduit/matrix-conduit:next'
healthcheck:
disable: true
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.conduit.rule=Host(`matrix.rustybever.be`)'
- 'traefik.http.routers.conduit.tls=true'
- 'traefik.http.routers.conduit.tls.certresolver=letsEncrypt'
- 'traefik.http.services.conduit.loadbalancer.server.port=6167'
- 'traefik.http.routers.conduit.middlewares=cors-headers@docker'
- 'traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*'
- 'traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization'
- 'traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS'
configs:
- source: conduit_v7
target: '/srv/conduit/conduit.toml'
environment:
- 'CONDUIT_CONFIG=/srv/conduit/conduit.toml'
networks:
- 'default'
- 'public'
volumes:
- 'conduit:/var/lib/matrix-conduit'
# =====FACEBOOK MESSENGER BRIDGE=====
facebook:
image: 'dock.mau.dev/mautrix/facebook:v0.4.0'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
networks:
- 'default'
- 'monitoring'
volumes:
- 'facebook:/data'
facebook-db:
image: 'postgres:14.5-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
healthcheck:
test: pg_isready
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
environment:
- 'POSTGRES_DB=matrix_fb'
- 'POSTGRES_USER=matrix_fb'
- 'POSTGRES_PASSWORD=matrix_fb'
volumes:
- 'facebook-db:/var/lib/postgresql/data'
# =====SIGNAL BRIDGE=====
signal:
image: 'dock.mau.dev/mautrix/signal:v0.4.0'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
networks:
- 'default'
- 'monitoring'
volumes:
- 'signal:/data'
- 'signald:/signald'
signald:
image: 'signald/signald:0.23.0'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
volumes:
- 'signald:/signald'
signal-db:
image: 'postgres:14.5-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
healthcheck:
test: pg_isready
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
environment:
- 'POSTGRES_DB=matrix_signal'
- 'POSTGRES_USER=matrix_signal'
- 'POSTGRES_PASSWORD=matrix_signal'
volumes:
- 'signal-db:/var/lib/postgresql/data'
# =====IRC BRIDGE=====
irc:
image: 'hif1/heisenbridge:1.14.0'
command: >
-c /data/config.yaml
http://conduit:6167
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
volumes:
- 'irc:/data'
# =====DISCORD BRIDGE=====
# discord:
# image: 'dock.mau.dev/mautrix/discord:latest'
# deploy:
# mode: 'replicated'
# replicas: 1
# placement:
# constraints:
# - 'node.labels.class==matrix'
# networks:
# - 'default'
# - 'monitoring'
# volumes:
# - 'discord:/data'
# discord-db:
# image: 'postgres:14.3-alpine'
# deploy:
# mode: 'replicated'
# replicas: 1
# placement:
# constraints:
# - 'node.labels.class==matrix'
# healthcheck:
# test: pg_isready -U matrix_discord
# interval: 30s
# timeout: 5s
# retries: 3
# start_period: 15s
# environment:
# - 'POSTGRES_DB=matrix_discord'
# - 'POSTGRES_USER=matrix_discord'
# - 'POSTGRES_PASSWORD=matrix_discord'
# volumes:
# - 'discord-db:/var/lib/postgresql/data'
configs:
conduit_v7:
external: true
networks:
public:
external: true
monitoring:
external: true
volumes:
conduit:
facebook:
facebook-db:
signal:
signald:
signal-db:
irc:
# discord:
# discord-db: