Nginx not serving the site anymore.
Dockerfile:
FROM nginx:alpine
ARG ENVIRONMENT
COPY $ENVIRONMENT /usr/share/nginx/html
folder has staging (folder), production (folder), dockerfile.
Previously I had just site (folder), dockefile.
Site on its own worked fine, now that I have added in a new env, the site doesnt load. Nginx logs dont show anything
12 Replies
Project ID:
13314144-b328-475d-867f-a0337164519f
13314144-b328-475d-867f-a0337164519f
I have the ENVIRONEMENT var set
and in the logs i see that staging is copied into the nginx folder
what do you see when you go to your domain?
Railway: Application failed to respond
i think youre forgetting a
PORT
service variable, set it to 80
ah!
let me try that. so just add PORT to the env vars in railway?
I didnt have the port variable previously
theres your problem
Adding port worked thanks :). Why did it work without the port before?
with the same nginx setup, it would not have worked without a PORT service variable set, the template that i think you used sets one for you
Ah that makes sense. Thank you very much for your help
no problem 🙂