Hi,
I’m trying to get Nextcloud working with an Apache webserver and MariaDB using docker-compose. I’m basically using the example shown in the Nextcloud quick reference on Docker Hub. This is my docker-compose file:
I’m not sure what I was expecting to see, but I guess after defining the MariaDB environment in the compose file, I wasn’t expecting to enter the details again. Do I? If so, what do I enter for localhost:port? I’m connecting to the Nextcloud instance using 10.1.1.18:8000.
yes. because you only created the database in the mariadb container. you would have to set also set the environment variables for the nextcloud container.
db or mariadb
it’s the name of the container. internal docker dns.
Thanks Reiner, that makes sense . So, I enter the details and get a little further. I see this screen. I assume it’s the MYSQL_PASSWORD I use for the database password, but I’ve tried both passwords anyway with similar results.
Interestingly, I did have that in at one point, but decided to take it out to match as closely the quick reference example provided. I’ve put it back with, but the result is exactly the same.
I’ve had a look around the forum for clues, but most of the relevant threads seem to want me to ‘roll up my sleeves and get under the hood’ to fix the problem. I’m trying to avoid that with the quick reference examples if I can.
EDIT: It appears that the referred quick reference example doesn’t work as stated for the Docker version of Nextcloud 19.
It takes a while for the MariaDB container to do its thing. What gave it away for me was the ebb and flow of disk activity I was hearing from the server. It can take as long as five to 10 minutes for the container to settle. I suggest you go and make a nice cup of tea and have a biscuit while waiting.
If you’re impatient (like me!), you can trace what the container is doing with sudo docker logs -f mariadb (replace mariadb with whatever is the name of your db container; Ctrl-C to exit). You’ll be able to log in after you see the lines highlighted in the image below.