starting with the great work of @pierreozoux, I’ve put together a few docker-compose examples for nextcloud installations with different additional containers. All examples use the official nextcloud docker container.
- minimal example
- reverse proxy + letsencrypt
I’m planning to add more examples (for example wonderfalls AiO container) in the future.
I hope I can help a few people to get started with their dockerized nextcloud installation.
Here’s my Github:
That’s really great!
I’m an intermediate hacker in docker and an open source contributor to Mozilla, Fedora, Docker and KDE.
I would like to contribute to dockerized nextcloud, Please let me know the pending issues/backlogs so that I can assist this part as a contributor.
Amit Kumar Jaiswal
Your work would be very welcome. The official repository is here. @pierreozoux submitted a PR to the official docker images repo. There are no official recommendations/examples for docker-compose, so I made my own.
The biggest problem I’m facing right now is the best way to include cronjobs to the setup. There are 3 possibilities that all have there downsides. Maybe you have a word on that?
- Run Cron on host -> very “ugly” solution in my eyes. It requires additional configuration on the host and depends on that to run properly.
- Start an extra container install docker and cron and run cron there. -> as stated here http://serverfault.com/a/799596
- Use supervisor (or anything similar) to run cron and nextcloud in one container -> feels like the cleanest solution to me. It violates one process per container but keeps the dependencies together.
I made a container for the 3rd solution based on the official image here: https://github.com/SnowMB/docker
Any words on that?
As discussed here, I do it slightly differently, it is just an extra container, but it doesn’t need docker and cron installed inside.
Hi @Snowyo ,
EDIT: solved it for now - needed to run with
root db credential on the first launch… However I don’t know how to replace not maintained
jrcs/letsencrypt-nginx-proxy-companion without breaking the install. I’m getting error 503 now…
I am trying to deploy your docker-compose with letsencrypt but running into an issue with 16.04 LTS VM.
I get this error in the browser
App directory "/var/www/html/custom_apps" not found! Please put the Nextcloud apps folder in the Nextcloud folder or the folder above. You can also configure the location in the config.php file.
I am using your .env, install.sh and nginx.conf. What do I need to update to make this work? Is it on line 57 in docker-compose.yml?
volumes: - ./nextcloud/apps:/var/www/html/apps I believe
apps should be
Also I am getting the db connection error after I fixed the
SQLSTATE[HY000] access denied for user email@example.com (using password: YES)
I am providing this info
Database Server: db:3306
Database Name: nextcloud
Thank you in advance for your assistance.