Unable to deploy Turborepo
ivankrzak
HOBBYOP

a year ago

Hello,

We have upcoming 3 projects that we want to build using t3-turborepo (NextJs, Trpc, Expo...)

That mean in all of these projects we would like to deploy NEXT JS , Postgress and also Storage on Railway.

I tried to use NIXPACKS first but it had issues with identifying packages in workspaces. Tried RAILPACK but no luck, at least not with my config.

DEPLOYMENT ID : 9d682a45-ca8f-4e9b-b709-8704ad2ac6c3

GH REPO: https://github.com/ivankrzak/t3-mono-template

How to deploy Turborepo on railway properly ?

Thank you

$10 Bounty

6 Replies

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody about 1 year ago


ivankrzak
HOBBYOP

a year ago

Can someone guide me how to set it up ?


a year ago

Hello,

I've moved this thread into our bounty board so that a community member may come to help.

The Railway team cannot offer project-level help, we are limited to providing support for issues that directly relate to the Railway platform and product.

Best,

Brody


ivankrzak
HOBBYOP

a year ago

Hello

Why do you market 1 day support on your plans then when you cannot help?

I can read the docs and product pages myself. I will get the up running using NIXPACKS instead. But no real support scares me and we will reconsider using railway for those 3 production apps


a year ago

Hello,

1 Day support is in regards to issues that relate directly to Railway, unfortunately, as much as I would like to, we are unable to offer project setup help.

Best,

Brody


a year ago

So far I'm managing my turborepos with Dockerfiles.

1. each service has its railway.json config file pointing to the Dockerfile in a root folder

  1. each Dockerfile has two steps: build + gather resources
  2. the build step installs packages from the root folder and runs build with the --filter flag for the particular service
  3. next step copies the built output of the service to the target Docker image and configures the run command

I opened a thread myself asking if there could be a single build step to safe time and resources on this. We're not paying for this anyway, but it's important for me from ecological point of view.


a year ago

Here's an example Dockerfile

```

FROM oven/bun:alpine AS build

WORKDIR /build

COPY . .

RUN bun install

RUN bun run build --filter web

FROM oven/bun:alpine

WORKDIR /usr/src/app

COPY --from=build /build/packages/web/build/ .

CMD ["bun", "index.js"]

```


Welcome!

Sign in to your Railway account to join the conversation.

Loading...