#Nginx not serving the site anymore.

17 messages · Page 1 of 1 (latest)

winter socket
#

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

static isleBOT
#

Project ID: 13314144-b328-475d-867f-a0337164519f

deft gladeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

winter socket
#

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

tranquil laurel
#

what do you see when you go to your domain?

winter socket
#

Railway: Application failed to respond

tranquil laurel
#

i think youre forgetting a PORT service variable, set it to 80

winter socket
#

ah!

#

let me try that. so just add PORT to the env vars in railway?

#

I didnt have the port variable previously

tranquil laurel
#

theres your problem

winter socket
#

Adding port worked thanks :). Why did it work without the port before?

tranquil laurel
#

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

winter socket
#

Ah that makes sense. Thank you very much for your help