How to split the build process from 1 repo and deploying 2 different services?
I am trying to deploy (1 node, and 1 go) service.
And I have a
Dockerfile
for deploying the Node service.
But, now the go service is also using the same Dockerfile
.
I prefer to use the Config As Code option, instead of using UI settings.22 Replies
Project ID:
N/A
I saw the
railway.json
option, my question is that can I have two of them.
One for node and other for go service?
Project ID: 8fc2ad89-714b-4cb3-9778-cb64d1373409you can have two yes, but first can you tell me about your file structure?
It's kind of messy structure, as of now.
Did I missed any file, which needs to be mentioned?
looks easy enough to deploy, do you already have two blank railway services
I have a node service already running on prod.
Now, I am trying to add a go service.
and that Dockerfile, that's for the go app right? it has nothing to do with node?
That
Dockerfile
is for the nodedo you have a dockerfile for the go app, or are you going to let nixpacks try and build it?
It would be nice to use Docker.
What I can try is to have two
railway.json
file.
For example
- railway.node.json
in (src directory)
- railway.go.json
in (app directory)
Will something like this work? Just a rough idea 🤷♂️yes it can work, but I don't currently see a need for the difference of names, but one thing at a time here.
do you have a Dockerfile for the go app? or have you yet to write one?
I have yet to write one
in the mean time, do you think nixpacks would be able to build your go app?
I was able to run 2 different services from single repo, using
railway.json
file.
Thanks for the help. 🙂no problem!
Continuing on the same ticket.
Now, I ran into similar issue. Where I have set the app sleep to disable for production, but how can I enable it for non-production environment.
Since I ham using
railway.json
file, I am not able to modify the settings manually for non-prod env.
I tried looking into the docs, for PR Environment Overrides
But railway.json
schema is not showing any linting for this object.yeah it doesn't have schema validation for this, but it should still work.. does it not work?
I am getting this error in the railway dashboard.
The actual config, I used.
Here
testing
is an environment in railway not a PR branch name from git.that's your full railway.json?
Here's the full json file.
I'll have to do some testing and get back to you
works as intended - https://github.com/brody192/environment-overrides/blob/main/railway.json