--- services: install_site: build: install_site environment: - BASE_URL - EMAIL volumes: - ./nginx.conf:/web/matrix.conf - sites:/sites/ - certs:/etc/letsencrypt/ - certbotroot:/var/www/certbot/ - /var/run/docker.sock:/var/run/docker.sock db: image: docker.io/postgres:15 restart: unless-stopped volumes: - db:/var/lib/postgresql/data/ environment: - POSTGRES_DB - POSTGRES_USER - POSTGRES_PASSWORD matrix: image: docker.io/matrixdotorg/synapse:latest restart: unless-stopped volumes: - config:/config/ - data:/data/ environment: - SYNAPSE_SERVER_NAME=$BASE_URL - SYNAPSE_REPORT_STATS - SYNAPSE_CONFIG_DIR=/config - SYNAPSE_DATA_DIR=/data - POSTGRES_HOST=db - UID=$PUID - GID=$PGID env_file: - .env networks: - nginx - default depends_on: - db volumes: sites: external: true certs: external: true certbotroot: external: true db: config: data: networks: nginx: external: true