services: synapse-db: image: "${postgres_image}:${postgres_version}" container_name: synapse-db volumes: - matrixdotorg_synapse-pgsql:/var/lib/postgresql/data/:Z healthcheck: test: ["CMD-SHELL", "pg_isready -U synapse"] interval: 60s timeout: 10s retries: 3 start_period: 5s synapse: image: "${synapse_image}:${synapse_version}" container_name: synapse ports: - ${listen_if}:${listen_port}:8008 volumes: - matrixdotorg_synapse-data:/data:Z healthcheck: test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"] interval: 60s timeout: 10s retries: 3 start_period: 15s depends_on: synapse-db: condition: service_healthy restart: true volumes: matrixdotorg_synapse-pgsql: matrixdotorg_synapse-data: