93 lines
2.6 KiB
YAML
93 lines
2.6 KiB
YAML
version: "3.4"
|
|
|
|
networks:
|
|
matrix:
|
|
proxy:
|
|
external: true
|
|
|
|
services:
|
|
synapse:
|
|
image: "matrixdotorg/synapse"
|
|
container_name: "matrix_synapse"
|
|
restart: "unless-stopped"
|
|
volumes:
|
|
- "./data/matrix/synapse/:/data/"
|
|
environment:
|
|
SYNAPSE_SERVER_NAME: "matrix.DOMINIO"
|
|
SYNAPSE_REPORT_STATS: "yes"
|
|
UID: "1000"
|
|
GID: "1000"
|
|
TZ: "Europe/Madrid"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.matrix.rule=Host(`matrix.DOMINIO`) && PathPrefix(`/_matrix/`)"
|
|
- "traefik.http.routers.matrix.entrypoints=websecure"
|
|
- "traefik.http.routers.matrix.tls=default"
|
|
# - "traefik.http.routers.matrix.tls.certresolver=default"
|
|
- "traefik.http.services.matrix.loadbalancer.server.port=8008"
|
|
- "traefik.docker.network=proxy"
|
|
networks:
|
|
# - matrix
|
|
- proxy
|
|
|
|
riot:
|
|
image: "bubuntux/element-web"
|
|
container_name: "matrix_riot"
|
|
restart: "unless-stopped"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.riot.rule=Host(`matrix.DOMINIO`)"
|
|
- "traefik.http.routers.riot.entrypoints=websecure"
|
|
- "traefik.http.routers.riot.tls=true"
|
|
- "traefik.http.routers.riot.tls.certresolver=default"
|
|
- "traefik.http.services.riot.loadbalancer.server.port=80"
|
|
- "traefik.docker.network=proxy"
|
|
volumes:
|
|
- "./data/matrix/riot/config.json:/app/config.json"
|
|
networks:
|
|
- matrix
|
|
- proxy
|
|
matrix-db:
|
|
image: "postgres:10"
|
|
container_name: "matrix_db"
|
|
restart: "unless-stopped"
|
|
environment:
|
|
POSTGRES_USER: NOMBRE_USUARIO
|
|
POSTGRES_PASSWORD: PASSWORD_BD
|
|
LANG: C
|
|
POSTGRES_DB: synapse
|
|
POSTGRES_INITDB_ARGS: "--encoding='UTF8' --lc-collate='C' --lc-ctype='C'"
|
|
healthcheck:
|
|
test: '/usr/bin/psql --username synapse --command "SELECT 1;"'
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 30
|
|
volumes:
|
|
- "./data/postgres/data:/var/lib/postgresql/data"
|
|
networks:
|
|
- matrix
|
|
|
|
matrix-redis:
|
|
image: "redis:latest"
|
|
container_name: "matrix_redis"
|
|
restart: "unless-stopped"
|
|
networks:
|
|
- matrix
|
|
|
|
nginx:
|
|
image: "nginx:latest"
|
|
container_name: "matrix_nginx"
|
|
restart: "unless-stopped"
|
|
volumes:
|
|
- "./data/matrix/nginx/matrix.conf:/etc/nginx/conf.d/matrix.conf"
|
|
- "./data/matrix/nginx/www:/var/www/"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
# - "traefik.http.services.matrix.loadbalancer.server.port=80"
|
|
- "traefik.http.routers.matrix.rule=Host(`matrix.DOMINIO`)"
|
|
- "traefik.http.routers.matrix.entrypoints=http"
|
|
# - "traefik.http.routers.matrix.tls.certresolver=mytlschallenge"
|
|
networks:
|
|
- matrix
|
|
|