Using Railway to Deploy Docker Images
It's hard to describe what I mean: If I see a Docker image on the public repositories that I want try out, can I use Railway for that? Such as a Traefik, or Wordpress or something else
13 Replies
Project ID:
N/A
N/A
I understand that you can use Dockerfile to pull images, but I'm unsure about how you actually do it. The precise syntax.
Would one simply do
FROM wordpress
or would they copy the Dockerfile in the repo?
Like https://github.com/docker-library/wordpress/blob/5f5172057791d1deb1919fdd1c5c45e7daae3362/latest/php8.0/apache/Dockerfile
I tried just this as a Dockerfile, and it didn't seem to work. It built & deployed, but I cannot access the service. No errors in the deploy log. Does it need specific mention of the entrypoint, perhaps?
I'm guessing it's because it needs to listen on $PORT and it's probably just on port 80for nginx you can look at the railway provided template
https://github.com/railwayapp-templates/nginx
it works because nginx listens on PORT 80 by default, and the "deploy on railway" button will set that for you, you arent using that template so you need to set PORT = 80 in your service variables manually
Gotcha I just figured that out at the same time you messaged
Will that work for other images? If I try to put a wordpress instance, will it just hook up naturally with that PORT service variable?
The only limitation on images I know of with Railway is it won't do TCP
for wordpress, you cant really run wordpress on railway since it requires persistent storage
Gotcha. I don't actually want to run Wordpress, but I was curious about if it would "run"
so thats off the table unless you wanted to setup serverless wordpress, and imo thats not worth it and also something that we cant provide help with
ah okay
My endgoal is actually to see about whether Railway could run a HTTPS proxy image
i mean, railway is an https proxy
but i think you mean load balancer?
To be clear, I am not talking about Nginx or something for infastructure
I mean this
i think that would be possible