--- 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 - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C matrix: image: docker.io/matrixdotorg/synapse:v1.98.0 restart: unless-stopped volumes: - config:/config/ - data:/data/ environment: - SYNAPSE_SERVER_NAME=$BASE_URL - SYNAPSE_CONFIG_DIR=/config - SYNAPSE_DATA_DIR=/data - UID=$PUID - GID=$PGID networks: - nginx - default depends_on: - db volumes: sites: external: true certs: external: true certbotroot: external: true db: config: data: networks: nginx: external: true