volumes: synapse-data: postgres: secrets: postgres_password: file: ./postgres_password.txt services: postgres: image: postgres:${POSTGRESQL_IMAGE_TAG} restart: unless-stopped volumes: - postgres:/var/lib/postgresql/data:rw secrets: - postgres_password environment: POSTGRES_DB: synapse POSTGRES_USER: synapse_user POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password POSTGRES_INITDB_ARGS: --encoding=UTF8 --locale=C synapse: image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG} restart: unless-stopped volumes: - synapse-data:${CONFIG_DIR} ports: - 8008:8008 environment: SYNAPSE_CONFIG_DIR: ${CONFIG_DIR} SYNAPSE_CONFIG_PATH: ${CONFIG_DIR}/${CONFIG_FILE_NAME} UID: ${UID} GID: ${GID} TZ: ${TZ} depends_on: - postgres nginx: build: nginx restart: unless-stopped ports: - 443:443 - 8448:8448 volumes: - ${SSL_CERT_PATH}:${SSL_CERT_PATH}:ro - ${SSL_KEY_PATH}:${SSL_KEY_PATH}:ro environment: SERVER_NAME: ${SERVER_NAME} HTTPS_PORT: ${HTTPS_PORT} FEDERATION_HTTPS_PORT: ${FEDERATION_HTTPS_PORT} SSL_CERT_PATH: ${SSL_CERT_PATH} SSL_KEY_PATH: ${SSL_KEY_PATH} depends_on: - synapse