Static Site using Nginx + Railway domain not loading
I have a SvelteKit static site I'm trying to deploy using this Dockerfile:
(somewhat copied from here - https://github.com/railwayapp-templates/nginx/blob/main/Dockerfile)
The build + deploy succeeded, and I generated a railway domain for it but I'm only seeing the "Application failed to respond" page.
Is there something network-related I'm missing?
11 Replies
Project ID:
bc2b0c44-e8c1-44a3-9e7e-58f076541628
bc2b0c44-e8c1-44a3-9e7e-58f076541628
just have nginx listen on 8080 and then set a PORT service variable to 8080
that's what the template does and that's what you're missing
I'll do that
Awesome, that was it! - totally missed that, thanks @Brody
no problem!
Hi, everybody
This should be do in the docker file?
in the service variables
https://docs.railway.app/develop/variables#defining-variables
Why if i'll set a PORT variable with the 8080 value it works? Shouldn't you create a relation somewhere in the site or docker file to that port variable?
nginx needs to listen on 8080 too
So is Railway who understand if the PORT variable is setted it should run in that port?
you first need to configure nginx to listen on 8080 yourself, then you set a PORT service variable to 8080 so that railway knows nginx is running on port 8080
for further help can you please open your own #✋|help thread?