version: "3" services: database: image: postgres:13.4-alpine environment: - POSTGRES_USER=nextcloud - POSTGRES_PASSWORD=nextcloud - POSTGRES_DB=nextcloud volumes: - ./data/database:/var/lib/postgresql/data restart: always nextcloud: image: nextcloud:23.0.4 restart: unless-stopped ports: - 9000:80 env_file: - ../env.production - env.production environment: POSTGRES_HOST: database POSTGRES_DB: nextcloud POSTGRES_USER: nextcloud POSTGRES_PASSWORD: nextcloud #NEXTCLOUD_TRUSTED_DOMAINS: "${NEXTCLOUD_HOSTNAME}" NEXTCLOUD_TRUSTED_DOMAINS: cloud.example.com NEXTCLOUD_ADMIN_USER: admin volumes: - ./data/nextcloud:/var/www/html depends_on: - database