version: "3.8" volumes: nextcloud: name: ${NEXTCLOUD_VOLUME_NAME:-nextcloud} services: nextcloud-fpm: container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-fpm image: ${NEXTCLOUD_IMAGE:-nextcloud:23.0.0-fpm-alpine@sha256:b02448c82a7fec3d1d0aacbeab466707929a9acbe7c069db4dca14166878ceb1} restart: always depends_on: - postgres - redis volumes: - nextcloud:/var/www/html - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro environment: NEXTCLOUD_TRUSTED_DOMAINS: ${NEXTCLOUD_TRUSTED_DOMAINS?err} NEXTCLOUD_ADMIN_USER: ${NEXTCLOUD_ADMIN_USER?err} NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD?err} OVERWRITEPROTOCOL: ${OVERWRITEPROTOCOL:-https} PHP_UPLOAD_LIMIT: ${PHP_UPLOAD_LIMIT:-512M} 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} REDIS_HOST: ${REDIS_CONTAINER_NAME:-redis} # Default name is same as ../redis/docker-compose.yml:4 PUID: ${NEXTCLOUD_PUID:-1000} PGID: ${NEXTCLOUD_PGID:-1000} nextcloud-web: container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-web build: web restart: always environment: NEXTCLOUD_FPM_CONTAINER_NAME: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-fpm PUID: ${NEXTCLOUD_PUID:-1000} PGID: ${NEXTCLOUD_PGID:-1000} depends_on: - nextcloud-fpm volumes: - nextcloud:/var/www/html - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro nextcloud-cron: image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.3-fpm-alpine} container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-cron restart: always depends_on: - nextcloud-web entrypoint: /cron.sh environment: PUID: ${NEXTCLOUD_PUID:-1000} PGID: ${NEXTCLOUD_PGID:-1000} volumes: - nextcloud:/var/www/html - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro