version: '3.5' services: nextcloud: container_name: nextcloud image: nextcloud:latest restart: always ports: - 8122:80 volumes: - ${BASE_DATA_DIR}/nextcloud/app:/var/www/html - ${BASE_DATA_DIR}/nextcloud/data:/var/www/html/data - ${BASE_DATA_DIR}/nextcloud/config:/var/www/html/config - ./opcache-recommend.ini:/usr/local/etc/php/conf.d/opcache-recommend.ini environment: - POSTGRES_HOST=nextcloud-db - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} depends_on: - db db: image: postgres restart: always hostname: nextcloud-db volumes: - ${BASE_DATA_DIR}/nextcloud/postgres-data:/var/lib/postgresql/data environment: - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} redis: image: redis:alpine container_name: redis restart: always volumes: - ${BASE_DATA_DIR}/nextcloud/redis:/data