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
No description
12 Replies
Percy
Percy•13mo ago
Project ID: 13314144-b328-475d-867f-a0337164519f
TurboFarmer9000
TurboFarmer9000OP•13mo ago
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
TurboFarmer9000
TurboFarmer9000OP•13mo ago
No description
Brody
Brody•13mo ago
what do you see when you go to your domain?
TurboFarmer9000
TurboFarmer9000OP•13mo ago
Railway: Application failed to respond
Brody
Brody•13mo ago
i think youre forgetting a PORT service variable, set it to 80
TurboFarmer9000
TurboFarmer9000OP•13mo ago
ah! let me try that. so just add PORT to the env vars in railway? I didnt have the port variable previously
Brody
Brody•13mo ago
theres your problem
TurboFarmer9000
TurboFarmer9000OP•13mo ago
Adding port worked thanks :). Why did it work without the port before?
Brody
Brody•13mo ago
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
TurboFarmer9000
TurboFarmer9000OP•13mo ago
Ah that makes sense. Thank you very much for your help
Brody
Brody•13mo ago
no problem 🙂
Want results from more Discord servers?
Add your server