services:
db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_PASSWORD=supersecretpassword
- MYSQL_DATABASE=nextclouddb
- MYSQL_USER=nextclouduser
- MYSQL_RANDOM_ROOT_PASSWORD='yes'
redis:
image: redis
restart: always
command: redis-server --requirepass supersecretpassword2
app:
image: nextcloud:27
restart: always
ports:
- 8080:80
links:
- db
- redis
volumes:
- ./html:/var/www/html
environment:
- MYSQL_PASSWORD=supersecretpassword
- MYSQL_DATABASE=nextclouddb
- MYSQL_USER=nextclouduser
- MYSQL_HOST=db
- REDIS_HOST_PASSWORD=supersecretpassword2
depends_on:
- db
- redis
cron:
image: nextcloud:27
restart: always
volumes:
- ./html:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
6 Comments
sturlabragason@lemmy.world · 11 pts · 3y
Here is something else: https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml
megaman@discuss.tchncs.de · 3 pts · 3y
Thats my password!
DJArbz@lemmy.notmy.cloud · 1 pts · 3y
Mine too!
rutrum@lm.paradisus.day · 2 pts · 3y
First time I'm seeing cron as a separate service. That's fascinating! I had to add cronjob to the host machine to get that to work. Can you explain more how that works? It kind of looks like you're running two nextcloud containers? I could be mistaken.
doeknius_gloek@feddit.de · 2 pts · 3y
Not OP but I'm doing almost the same thing in Kubernetes. Basically you start a Nextcloud container but only to run the cronjob, not Nextcloud itself. In my case, Kubernetes creates a new container for each cron execution. Apparently there's also a cron.sh script already bundled with the Nextcloud image, that can run continously. At least OP doesn't seem to mount the script from somewhere else.
possiblylinux127@lemmy.zip · 1 pts · 3y
Yes, one runs the crown service and the other is the main service. All cron.sh does is sleep and then run the cron service repeatedly