deployment/stacks/matrix.yml

154 lines
3.3 KiB
YAML

# Conduit - Behind Traefik Reverse Proxy
version: '3.4'
services:
# ====MATRIX SERVER=====
conduit:
image: 'matrixconduit/matrix-conduit:next'
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_v4
target: '/srv/conduit/conduit.toml'
networks:
- 'default'
- 'public'
volumes:
- 'conduit:/srv/conduit/.local/share/conduit'
# =====FACEBOOK MESSENGER BRIDGE=====
facebook:
image: 'dock.mau.dev/mautrix/facebook:v0.3.2'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
networks:
- 'default'
- 'monitoring'
volumes:
- 'facebook:/data'
facebook-db:
image: 'postgres:14.1-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
environment:
- 'POSTGRES_DB=matrix_fb'
- 'POSTGRES_USER=matrix_fb'
- 'POSTGRES_PASSWORD=matrix_fb'
volumes:
- 'facebook-db:/var/lib/postgresql/data'
# =====SIGNAL BRIDGE=====
signal:
image: 'chewingbever/mautrix-signal:latest'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
networks:
- 'default'
- 'monitoring'
volumes:
- 'signal:/data'
- 'signald:/signald'
signald:
image: 'signald/signald:latest'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
volumes:
- 'signald:/signald'
signal-db:
image: 'postgres:14.1-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
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.8.0'
command: >
-c /data/config.yaml
http://conduit:6167
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==matrix'
volumes:
- 'irc:/data'
configs:
conduit_v4:
external: true
networks:
public:
external: true
monitoring:
external: true
volumes:
conduit:
facebook:
facebook-db:
signal:
signald:
signal-db:
irc: