'Laravel mix-manifest docker nginx container and php container
I would like to understand how a nginx container processes css and js files with a php container.
We build 2 docker images for production.
For each the nginx and php container we run RUN npm ci && npm run prod within the container image build.
If we launch the containers on ECS they render fine and my my source tab looks like the following:
which is 100% for cache busting.
Things i dont understand:
- If i remove the
RUN npm ci && npm run prodcommand from the nginx container and launch to production i just get a white page and my source looks like this:
- If i keep
RUN npm ci && npm run prodfor my nginx container but leave out theRUN npm ci && npm run prodfrom the php container and launch the images to production my website launches fine but i lose the versioning on my files and my source looks like this:
I want to know why this happens and what role does nginx take part in because in my config for nginx it handles all php related files so i wanted to know why php cant handle the versioned builds by itself or visa-versa.
Hope this makes sense. Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|



