name: matrix services: synapse: container_name: ${CONTAINER_NAME} hostname: ${CONTAINER_NAME} image: matrixdotorg/synapse:latest restart: ${RESTART_POLICY} cpu_shares: 90 deploy: resources: limits: memory: 15841M entrypoint: - /bin/sh - -c - > set -e if [ ! -f /data/homeserver.yaml ]; then echo "Generating initial configuration..." /start.py generate echo "" >> /data/homeserver.yaml echo "enable_registration: true" >> /data/homeserver.yaml echo "enable_registration_without_verification: true" >> /data/homeserver.yaml fi echo "Starting Synapse..." exec /start.py environment: - SYNAPSE_REPORT_STATS=${SYNAPSE_REPORT_STATS} - SYNAPSE_SERVER_NAME=${SUBDOMAIN}.${DOMAIN} networks: - traefik volumes: - type: bind source: ${DATA_PATH} target: /data bind: create_host_path: true logging: driver: "json-file" options: max-size: "10m" max-file: "3" labels: - "traefik.enable=true" - "traefik.http.routers.${ROUTER_NAME}.entrypoints=websecure" - "traefik.http.routers.${ROUTER_NAME}.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)" - "traefik.http.routers.${ROUTER_NAME}.tls=true" - "traefik.http.routers.${ROUTER_NAME}.tls.certresolver=${CERTIFICATE_RESOLVER}" - "traefik.http.services.${ROUTER_NAME}.loadbalancer.server.port=${CONTAINER_PORT}" - "traefik.docker.network=${TRAEFIK_NETWORK}" networks: traefik: name: traefik external: true