В корне создаём папку «nextcloud» и файлы файлы «docker-compose.yml»
mkdir nextcloud
touch nextcloud/docker-compose.yml
добавляем содержимое в docker-compose.yml cat > nextcloud/docker-compose.yml
version: "3"
services:
nextcloud-postgres:
image: postgres
container_name: nextcloud-postgres
restart: unless-stopped
environment:
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: (youpassword)
volumes:
- ./database:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "nextcloud", "-U", "nextcloud" ]
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
nextcloud-redis:
image: redis
container_name: nextcloud-redis
command: ["redis-server", "--requirepass", "(youpassword)"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
restart: unless-stopped
nextcloud-app:
image: nextcloud
container_name: nextcloud-app
restart: unless-stopped
environment:
NEXTCLOUD_TRUSTED_DOMAINS: nextcloud.(youdomaine)
OVERWRITECLIURL: https://nextcloud.(youdomaine)
OVERWRITEPROTOCOL: https
OVERWRITEHOST: nextcloud.(youdomaine)
TZ: Europe/Astrakhan
POSTGRES_HOST: nextcloud-postgres
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: (youpassword)
REDIS_HOST: nextcloud-redis
REDIS_HOST_PASSWORD: (youpassword)
NEXTCLOUD_ADMIN_USER: nextcloud_admin
NEXTCLOUD_ADMIN_PASSWORD: (youpassword)
volumes:
- ./app:/var/www/html
depends_on:
nextcloud-postgres:
condition: service_healthy
nextcloud-redis:
condition: service_healthy
labels:
- traefik.enable=true
- traefik.http.middlewares.nextcloud-app_https.redirectscheme.scheme=https
- traefik.http.routers.nextcloud-app.entrypoints=web
- traefik.http.routers.nextcloud-app.middlewares=nextcloud-app_https@docker
- traefik.http.routers.nextcloud-app.rule=Host(`nextcloud.(youdomaine)`)
- traefik.http.routers.nextcloud-app_https.entrypoints=websecure
- traefik.http.routers.nextcloud-app_https.rule=Host(`nextcloud.(youdomaine)`)
- traefik.http.routers.nextcloud-app_https.tls=true
- traefik.http.services.nextcloud-app.loadbalancer.server.port=80
- traefik.http.routers.nextcloud-app_https.tls.certresolver=le
networks:
default:
external:
name: traefik_network
а так же добавляем фаил с параметрами cat > nextcloud/nextcloud.ini upload_max_filesize=8G post_max_size=8G memory_limit=2G max_input_time 7200 max_execution_time 7200
замените {yourdomain} на свой домен так же (youpassword) на свой пароль.