Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The craftcms/nginx:<ver>-dev images on Docker Hub do not load nitro.conf #49

Open
Kethatril opened this issue Sep 29, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@Kethatril
Copy link

Description

In 1.2.7 the ability to add a nitro.conf file to the root was added and it to be included in the default.conf nginx config. This only fails to work for nginx images 7.3-8.0 however and 7.0-7.2 are fine.

Steps to reproduce

  1. start up a container using any of the craftcms/nginx:-dev images on docker hub (except 7.0-7.2)
  2. ssh into the container and look at the /etc/nginx/conf.d/default.conf file and see it is the production file and doesn't include include /app/*nitro.conf;

You can also inspect the layers of any of those images and see that NGINX_CONF is set to default.conf instead of dev.default.conf

@Kethatril Kethatril added the bug Something isn't working label Sep 29, 2021
@timkelty timkelty self-assigned this Sep 29, 2021
@timkelty
Copy link
Collaborator

timkelty commented Sep 29, 2021

Thanks for reporting – I was able to verify and reproduce this.
Just pushed out a new version of the images that should fix this (new images are currently building).

❯ docker run -it --entrypoint cat  craftcms/nginx:8.0-dev /etc/nginx/conf.d/default.conf | grep nitro
    # include custom configuration for nitro
    include     /app/*nitro.conf;

@Kethatril
Copy link
Author

Hmm, it doesn't look like it worked, the images on docker hub still have the production default.conf

@timkelty
Copy link
Collaborator

Yeah, I'm debugging the build pipeline…hoping this one will work: https://github.com/craftcms/docker/actions/runs/1287565862

Just takes a while for them to all build. I'll verify with a final test and post here before I close.

@Kethatril
Copy link
Author

I've figured out the issue, the ARG in the docker file is NGINX_CONF but the build-arg in build-and-push.yml is NGINX_CONFIG

@timkelty
Copy link
Collaborator

@Kethatril you're my hero. Thanks for the 🕵️ work.
Pushing out new images now.

@timkelty
Copy link
Collaborator

@Kethatril
Copy link
Author

Took me a bit ha, my brain kept skipping over it. I was sure it was something to do with the build args, but my brain kept insisting that NGINX_CONF was identical to NGINX_CONFIG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants