a month ago
I have an existing domain using a full stack web application currently hosted on an AWS EC2 machine. The UI uses React. The backend server uses a Java VM application. Both the UI bundle and the server image are already being built by using github actions. On the EC2 machine, nginx is used to serve this application.
Rather than having Railway build my system, I'd like to use my github-built artifacts in my Railway deployment. Also, it would make sense to continue using my working nginx setup.
What would be the recommended Railway deployment stucture for my purposes?
Would I use 2 Railway services, one for nginx, including the UI bundle, perhaps using the nginx-proxy-manager docker image, and one for the backend server? Or would it be easier to dispense with nginx, and use the available facilities of Railway to configure routing and other functions provided by nginx?
Thanks in advance for guidance and references on best practices for converting existing applications to Railway.
Azad
6 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 28 days ago
a month ago
Yes, I would recommend create services for each built docker image, another configuration can be set in the service settings
a month ago
Is it possible to upload the externally built docker image to a Railway service? I guess for the nginx service, the nginx-proxy-manager's user interface would allow uploading the static code. But I don't know the details of that yet.
a month ago
I'm not familiar with nginx-proxy-manager so I have no idea but yes, you can use external built docker image as a source, when you creating a service, select Docker and paste the image there
a month ago
Thank you for your prompt response about uploading the docker image. The only question that remains is whether I should continue using nginx or if it will be simpler to just use the Railway facilities for routing, adding certificates, etc. In the later case, I guess I will need two Railway services, one for the static content, and one for the backed server.
Thanks again.
a month ago
OK. Thanks so much. I will pursue your recommendations.
Status changed to Solved mayori • 28 days ago