name: nextcloud services: db: image: postgres:16 restart: always volumes: - ${POSTGRES_VOLUME_PATH}:/var/lib/postgresql/data environment: - POSTGRES_DB - POSTGRES_USER - POSTGRES_PASSWORD cache: image: redis:7.2.5-alpine restart: always command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_HOST_PASSWORD} volumes: - cache:/data app: image: nextcloud restart: always ports: - 8080:80 volumes: - ${NEXTCLOUD_VOLUME_PATH}:/var/www/html environment: - POSTGRES_HOST - POSTGRES_DB - POSTGRES_USER - POSTGRES_PASSWORD - PHP_MEMORY_LIMIT - PHP_UPLOAD_LIMIT - SMTP_HOST - SMTP_AUTHTYPE - SMTP_NAME - SMTP_PASSWORD - MAIL_FROM_ADDRESS - MAIL_DOMAIN - REDIS_HOST - REDIS_HOST_PORT - REDIS_HOST_PASSWORD depends_on: - db - cache cron: image: rcdailey/nextcloud-cronjob restart: always network_mode: none depends_on: - app volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - /etc/localtime:/etc/localtime:ro environment: - NEXTCLOUD_CONTAINER_NAME=app - NEXTCLOUD_PROJECT_NAME=nextcloud - NEXTCLOUD_CRON_MINUTE_INTERVAL=10 volumes: cache: