--- version: "3.8" services: nextcloud-fpm: depends_on: - postgres environment: &postgres-configuration POSTGRES_HOST: ${POSTGRES_CONTAINER_NAME:-postgres} # Default name is same as ../postgres/docker-compose.yml:8 POSTGRES_USER: ${POSTGRES_USER:?err} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err} POSTGRES_DB: ${POSTGRES_DB:?err} nextcloud-cron: environment: <<: *postgres-configuration