grommunio / gromox-container

Docker deployments for gromox, and grommunio (in progress)
7 stars 7 forks source link

Unable to find /etc/nginx/nginx.conf from gromox-core #3

Closed paz closed 1 year ago

paz commented 1 year ago

I have attached the log file. I am running on an arm64 server and had issues with the official docker image, so I have made a fork which I changed various things to get it to build for arm64. I got it working mostly, but got stuck at this error which is some weird behaviour after it all succesfully starts running.

error.log

paz commented 1 year ago

docker-compose.zip I have attached my docker-compose.yml here. It is pretty much the default. I had to zip it because github doesnt allow upload of yaml files.

grammola commented 1 year ago

@paz, the file /etc/nginx/nginx.conf is added during the standard nginx installation. If s6 complains that it can't find it, it means the installation of nginx in the image you created is faulty somehow. Sadly, I don't have an arm64 device to test your gromox-core image. However, you could use docker compose up -d to run your set up. Don't worry, the container will start even if s6 generates errors. Then go into the container and confirm the file is not available. Afterwards, try to install nginx within the container itself and see if the installation succeeds. If it does, you should have this nginx.conf file now. If not, you will see what the problem is.

Please keep me updated

paz commented 1 year ago

Actually, during the build process I tested renaming the nginx config folder after installation. So I added:

RUN mv /etc/nginx /etc/nginx.bak

After exploring the directory by attaching a shell to the container, I was able to verify that nginx.bak contained all the usual nginx conf files.

grammola commented 1 year ago

Great, I'm happy you resolved it. I'm closing the issue now. Please feel free to reach us if you need further help

paz commented 1 year ago

Unfortunately, I did not resolve the issue, that was merely additional information. I confirmed that my image is correct and including the nginx conf files. However, once you start it, it complains they are missing and they have disappeared. I notice that you have some other nginx.conf files as a part of an s6 service so I'm wondering if somewhere somehow its changing the /etc/nginx and breaking it.

I also saw some bits and pieces about setting a uid. Is it supposed to be doing a chroot? Maybe that isnt working?

grammola commented 1 year ago

@paz If your nginx conf files are in a directory called /etc/nginx.bak as you mentioned above, nginx won't find them unless you somehow inform nginx to look into /etc/nginx.bat instead of the standard /etc/nginx folder. It has to be in the /etc/nginx folder. We do not make any changes to the core nginx installation folder, so that error is entirely from this command RUN mv /etc/nginx /etc/nginx.bak or your changes.