T
Twenty3mo ago
abed3k

Can I deploy twenty-server on its own or do all services have to be deployed in the same environment

I am using railway.app to deploy the backend server. We already have an existing postgres table elsewhere and were planning to deploy the frontend using vercel. On railway.app I tried to point the build commands to the twenty-server directory npx nx build twenty-server and the start command was cd packages/twenty-server && yarn start:prod. I also depolyed a redis server in the same environment as the backend server on railway.app and set the REDIS_HOST, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD environment variables for the twenty-server deployment. With all of these configurations, my build succeeds but I always get the following deployment log errors:
Error: getaddrinfo ENOTFOUND redis.railway.internal
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'redis.railway.internal'
}
Error: getaddrinfo ENOTFOUND redis.railway.internal
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'redis.railway.internal'
}
So, I was wondering if there's a fix for this or if I might have made a mistake in my configuration. Additionally, am I allowed to deploy the twenty-server as a standalone while deploying twenty-front and twenty-postgres elsewhere, or do they all need to be deployed in the same environment?
1 Reply
thomast
thomast3mo ago
Hi, there must be an error in your network config. You can definitely run front/backend/DB in different environment yes. You simply need to set env variables accordigly!
Want results from more Discord servers?
Add your server