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