1
0
Fork 0
myserver-configuration/roles/matrix/templates/docker-compose.yml

119 lines
4.1 KiB
YAML

services:
postgres:
image: postgres:15
restart: unless-stopped
networks:
- internal
volumes:
- {{ server.work_dir }}/matrix/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=synapse
- POSTGRES_USER=synapse
- POSTGRES_PASSWORD=WRyu2kuArNjRxojstqpg7EfcoUP9zoka
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
synapse:
image: matrixdotorg/synapse:latest
restart: unless-stopped
ports:
- 8448:8448
networks:
- internal
- proxy
volumes:
- {{ server.work_dir }}/matrix/base:/data
- {{ server.work_dir }}/matrix/mautrix_facebook:/facebook_data
- {{ server.work_dir }}/matrix/mautrix_instagram:/instagram_data
- {{ server.work_dir }}/matrix/mautrix_discord:/discord_data
labels:
- "traefik.enable=true"
- "traefik.http.routers.matrix-secure.entrypoints=https"
- "traefik.http.routers.matrix-secure.rule=Host(`matrix.{{ server.domain }}`)"
- "traefik.http.routers.matrix-secure.tls=true"
- "traefik.http.routers.matrix-secure.tls.certresolver=sslResolver"
- "traefik.port=8008"
- "traefik.docker.network=proxy"
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
well-kwown:
image: nginx:latest
restart: unless-stopped
networks:
- internal
- proxy
volumes:
- ./nginx/matrix.conf:/etc/nginx/conf.d/matrix.conf
- ./nginx/www:/var/www/
labels:
- "traefik.enable=true"
- "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"
- "traefik.http.routers.matrix-wellknown.rule=Host(`matrix.{{ server.domain }}`) && PathPrefix(`/.well-known/matrix`)"
- "traefik.http.routers.matrix-wellknown.tls=true"
- "traefik.http.routers.matrix-wellknown.tls.certresolver=sslResolver"
- "traefik.http.routers.matrix-wellknown.middlewares=cors-headers@docker"
- "traefik.docker.network=proxy"
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
# BRIDGE
mautrix-facebook:
container_name: mautrix-facebook
image: dock.mau.dev/mautrix/facebook:latest
restart: unless-stopped
networks:
- internal
volumes:
- {{ server.work_dir }}/matrix/mautrix_facebook:/data
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
mautrix-instagram:
container_name: mautrix-instagram
image: dock.mau.dev/mautrix/instagram:latest
restart: unless-stopped
networks:
- internal
volumes:
- {{ server.work_dir }}/matrix/mautrix_instagram:/data
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
mautrix-discord:
container_name: mautrix-discord
image: dock.mau.dev/mautrix/discord:latest
restart: unless-stopped
networks:
- internal
volumes:
- {{ server.work_dir }}/matrix/mautrix_discord:/data
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
networks:
internal:
proxy:
external: true