Nicky
Nicky
RRailway
Created by Nicky on 4/17/2024 in #✋|help
What is the best way to install private npm packages?
My usecase is that my node app needs to install a package from a private github registry. What I would normally expect is to be able to pass a .npmrc (like Vercel) or a token from the env variables and have the usual installation during the build step. As per my understanding this is not currently supported by railway. So my question is, what would be the best workaround in this case? I'm not using a custom dockerfile for the build.
7 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
Hi, I'm facing the following issue with redis. I have a nestjs application where I'm using redis as the transport layer between microservices.
const redisURL = new URL(process.env.PUB_SUB_URL)

await app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
port: parseInt(redisURL.port),
host: redisURL.hostname,
username: redisURL.username,
password: redisURL.password,
},
})
await app.startAllMicroservices()
const redisURL = new URL(process.env.PUB_SUB_URL)

await app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
port: parseInt(redisURL.port),
host: redisURL.hostname,
username: redisURL.username,
password: redisURL.password,
},
})
await app.startAllMicroservices()
When I set the PUB_SUB_URL to ${{pubsub.REDIS_URL}} which is the public url everything is fine. But if I change the variable to ${{pubsub.REDIS_PRIVATE_URL}} I a connection closed error.
ERROR [Server] Error: getaddrinfo ENOTFOUND pubsub.railway.internal
ERROR [Server] Error: getaddrinfo ENOTFOUND pubsub.railway.internal
I've read about the private network initialisation times on railway but the redis service is already up and running at the time of deploying my nestjs app projectId: 8a8bfe2d-1094-4b5f-834a-eba6388d0180
17 replies
RRailway
Created by Nicky on 7/5/2023 in #✋|help
Private network
Hi! I have a similar issue to the one discussed here: https://discord.com/channels/713503345364697088/1122290612398477343 I have two services, A and B. Both services are running nodejs with fastify. A is a public service and wants to call the private service B. Whenever calling service B I get the following error: Error: connect ECONNREFUSED fd12:5f15:8f96::4f:8387:fcf5:8081 This is the endoint I'm calling using axios : http://my-address.railway.internal:8081/graphql Service B is running on port 8081, I've set it up from the env variables Any ideas?
15 replies