secrets: postgres_password: file: ./postgres_password.txt networks: frontend: external: ${DOCKER_PROXY_EXT-true} name: ${DOCKER_PROXY_NETWORK} backend: services: postgres: image: postgres:${POSTGRESQL_IMAGE_TAG} restart: unless-stopped volumes: - ${VOLUME_PATH}/var/lib/postgresql/data:/var/lib/postgresql/data:rw secrets: - postgres_password networks: - backend environment: POSTGRES_DB: synapse POSTGRES_USER: synapse_user POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password POSTGRES_INITDB_ARGS: --encoding=UTF8 --locale=C redis: image: redis:${REDIS_IMAGE_TAG} restart: unless-stopped networks: - backend synapse: image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG} restart: unless-stopped volumes: - ${VOLUME_PATH}/data:/data:rw logging: driver: "json-file" options: max-size: "1G" max-file: "3" ports: - ${SYNAPSE_PORT}:8008 networks: - frontend - backend environment: SYNAPSE_CONFIG_DIR: /data SYNAPSE_CONFIG_PATH: /data/${CONFIG_FILE_NAME} UID: ${UID} GID: ${GID} TZ: ${TZ} depends_on: - postgres