Hoy quiero traerte mi docker-compose de Nextcloud 30, lo más completo que tengo, espero que te sirva. (no es para usar en local, aunque puedes modificarlo para ello)
¿Que incluye?
- Mysql
- Redis
- Cron
- Servidor de alto rendimiento (hpb)
- Servidor de grabación (talk-recording)
- Collabora server
- AppApi (Necesario para instalar las aplicaciones docker de la tienda)
Puede generar sus “SECRETS” con openssl rand -base64 64
Completa con tu información los campos con “##########”
services:
nextcloud-db:
image: mariadb:10.11
container_name: nextcloud-mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW --log_bin_trust_function_creators=true
volumes:
- /tuRuta/db:/var/lib/mysql ##########
environment:
- MYSQL_ROOT_PASSWORD=contraseñaMuySegura ##########
- MYSQL_PASSWORD=contraseñaMYSQL ##########
- MYSQL_DATABASE=nombreBaseDeDatos ##########
- MYSQL_USER=tuUsuarioMYSQL ##########
nextcloud-app:
image: nextcloud:31.0.2
container_name: nextcloud-app
restart: always
ports:
- 8081:80
volumes:
- /tuRuta/nextcloud:/var/www/html ##########
environment:
- MYSQL_PASSWORD=contraseñaMYSQL ##########
- MYSQL_DATABASE=nombreBaseDeDatos ##########
- MYSQL_USER=tuUsuarioMYSQL ##########
- MYSQL_HOST=nextcloud-db:3306 ##########
- REDIS_HOST=nextcloud-redis ##########
- PHP_MEMORY_LIMIT=2G ##########
- PHP_UPLOAD_LIMIT=500G ##########
- PHP_OPCACHE_MEMORY_CONSUMPTION=2G ##########
- OVERWRITEPROTOCOL=https
- OVERWRITEHOST=subdominio.dominio.com ##########
- OVERWRITECLIURL=https://subdominio.dominio.com ##########
- NEXTCLOUD_TRUSTED_DOMAINS=subdominio.dominio.com ##########
- PHONE_REGION=AR ##########
- VIRTUAL_HOST=subdominio.dominio.com ##########
- TRUSTED_PROXIES=172.17.0.0/16 ########## No es la IP de Nginx Proxy Manager sino de su red padre (omite esto si usas red "host").
depends_on:
- nextcloud-db
devices:
- "/dev/dri:/dev/dri"
nextcloud-cron:
image: nextcloud:31.0.2
container_name: nextcloud-cron
restart: always
volumes:
- /tuRuta/nextcloud:/var/www/html ##########
entrypoint: /cron.sh
environment:
- PHP_MEMORY_LIMIT=2G ##########
- PHP_OPCACHE_MEMORY_CONSUMPTION=2G ##########
depends_on:
- nextcloud-app
- nextcloud-db
devices:
- "/dev/dri:/dev/dri"
nextcloud-collabora:
image: collabora/code
container_name: nextcloud-collabora
restart: always
environment:
- domain=subdominio\\.dominio\\.com ##########
- extra_params=--o:ssl.enable=false --o:ssl.termination=true
- username=tuUsuarioNextcloud ##########
- password=contraseñaNextcloud ##########
- dictionaries=es_ES es_AR es_MX en_US ##########
ports:
- 9981:9980
nextcloud-redis:
image: redis:alpine
container_name: nextcloud-redis
restart: always
#volumes: # No es necesario
# - /tuRuta/redis:/data # No es necesario
documentserver:
image: onlyoffice/documentserver
container_name: nextcloud-documentserver
ports:
- "8010:80"
environment:
- JWT_SECRET=configuraTuJWT_SECRET ##########
restart: always
nextcloud-appapi:
image: ghcr.io/cloud-py-api/nextcloud-appapi-dsp:v1.3.2
container_name: nextcloud-appapi-dsp
hostname: nextcloud-appapi-dsp
restart: unless-stopped
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NC_HAPROXY_PASSWORD=contraseñaParaHAPROXY ##########
- TIMEOUT_SERVER=1800s
nc-talk:
container_name: nextcloud-talk_hpb
image: nextcloud/aio-talk:latest
init: true
ports:
- 3480:3480/tcp
- 3480:3480/udp
- 8181:8081/tcp
environment:
- NC_DOMAIN=subdominio.dominio.com ##########
- TALK_HOST=signal.dominio.com ##########
- TURN_SECRET=crearUnTurnSecret ##########
- SIGNALING_SECRET=signalingSecret ##########
- TZ=America/Argentina/Buenos_Aires ##########
- TALK_PORT=3480
- INTERNAL_SECRET=tuInternalSecret ##########
restart: unless-stopped
aio-talk-recording:
container_name: nextcloud-talk-rcrd
environment:
- ALLOW_ALL=true
- HPB_DOMAIN=signal.espadarunica.win ##########
- NC_DOMAIN=drive.espadarunica.win ##########
- TZ=America/Argentina/Buenos_Aires ##########
- RECORDING_SECRET=recordingSecret ##########
- INTERNAL_SECRET=internalSecret ##########
ports:
- 1234:1234
restart: always
image: nextcloud/aio-talk-recording