R
Railway15mo ago
Xevion

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
Percy
Percy15mo ago
Project ID: N/A
Xevion
Xevion15mo ago
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
FROM nginx
FROM nginx
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 80
Brody
Brody15mo ago
for 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
Xevion
Xevion15mo ago
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
Brody
Brody15mo ago
for wordpress, you cant really run wordpress on railway since it requires persistent storage
Xevion
Xevion15mo ago
Gotcha. I don't actually want to run Wordpress, but I was curious about if it would "run"
Brody
Brody15mo ago
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
Xevion
Xevion15mo ago
My endgoal is actually to see about whether Railway could run a HTTPS proxy image
Brody
Brody15mo ago
i mean, railway is an https proxy but i think you mean load balancer?
Xevion
Xevion15mo ago
To be clear, I am not talking about Nginx or something for infastructure
Xevion
Xevion15mo ago
Xevion
Xevion15mo ago
I mean this
Brody
Brody15mo ago
i think that would be possible