a year ago
Hi
I’m trying to deploy a project to Railway using my existing docker-compose.yml file. It defines three services: PostgreSQL, Redis, and a Node/bun.js app (each has its own dockerfile). I want these services to be internally connected just like they are in local development.
I came across railway.json (or maybe railpack.json?) but I’m not sure if that’s the correct approach, or how to structure it for this use case.
Is there a way to deploy my exact docker-compose.yml to Railway and have all three services communicate with each other internally? If so, could someone provide an example or point me in the right direction?
thanks
4 Replies
a year ago
You can deploy a redis and postgresql database through railway and deploy the Dockerfile of your bun app and reference each service URL in the env vars using the internal network address
https://docs.railway.com/reference/private-networking
a year ago
You can also let Railpack/Nixpacks build your bun/node app instead of using a Dockerfile
a year ago
!s
Status changed to Solved medim • 11 months ago