Issue deploying Turbo Repo Next Convex. Only works with nixpack
varunteja007006
HOBBYOP

8 months ago

https://github.com/varunteja007006/open%5Ftemplates/blob/main/my-turbo-app/starter-convex-railway.toml

The following project deployment works only with builder "nixpacks". It does not work if I remove it.

Has anyone faced issue and can help me out what might be causing the issue.

Solved$10 Bounty

16 Replies

8 months ago

Hi,

Please add next build to your build command.


varunteja007006
HOBBYOP

8 months ago

buildCommand = "cd packages/convex-backend && npx convex deploy --cmd 'cd ../../ && pnpm build:starter-convex' --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URL"

i do have it --> pnpm build:starter-convex in the above and then

startCommand = "pnpm start:starter-convex"


samgordon

Hi, Please add `next build` to your build command.

varunteja007006
HOBBYOP

8 months ago

buildCommand = "cd packages/convex-backend && npx convex deploy --cmd 'cd ../../ && pnpm build:starter-convex' --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URL"

i do have it --> pnpm build:starter-convex in the above and then

startCommand = "pnpm start:starter-convex"


varunteja007006

buildCommand = "cd packages/convex-backend && npx convex deploy --cmd 'cd ../../ && pnpm build:starter-convex' --cmd-url-env-var-name NEXT\_PUBLIC\_CONVEX\_URL" i do have it --> pnpm build:starter-convex in the above and then startCommand = "pnpm start:starter-convex"

8 months ago

What does build:starter-convex do?


samgordon

Hi, Please add `next build` to your build command.

varunteja007006
HOBBYOP

8 months ago

I have 1 more doubt, Is it safe to upload logs? I can help upload the logs success one with nixpacks and another with RAILPACK which failed.

I hope it does not have any sensitive information. Could you please confirm.


8 months ago

Yes, it is safe to upload logs.


samgordon

What does `build:starter-convex` do?

varunteja007006
HOBBYOP

8 months ago

"build:starter-convex": "turbo build --filter=starter-convex",

Since its a turbo repo it will build the next app with shared packages as well.


8 months ago

Do you see just a build part of your script anywhere? It keeps chaining down to that command.


samgordon

Yes, it is safe to upload logs.

varunteja007006
HOBBYOP

8 months ago


samgordon

Do you see just a `build` part of your script anywhere? It keeps chaining down to that command.

varunteja007006
HOBBYOP

8 months ago

Its actually confusing because when I set builder = "nixpacks" in .toml it works but not when I set it to builder = "RAILPACK".

I will try to debug that build sequence via logs and if possible ssh


varunteja007006

Its actually confusing because when I set builder = "nixpacks" in .toml it works but not when I set it to builder = "RAILPACK". I will try to debug that build sequence via logs and if possible ssh

8 months ago

I would try to deploy it myself but Railway has horrible caching policies and I won't be able to deploy this repository for a while.

Can you try setting your start command to be sleep 999999, ssh into the container, and try to find where the .next directory or any build directory is located?


samgordon

I would try to deploy it myself but Railway has horrible caching policies and I won't be able to deploy this repository for a while. Can you try setting your start command to be `sleep 999999`, ssh into the container, and try to find where the .next directory or any build directory is located?

varunteja007006
HOBBYOP

8 months ago

I was able to ssh into the successful part of deploy not the failed one. Is it possible to ssh into the failed container?

sleep 999999 --> in the .toml file?


varunteja007006
HOBBYOP

8 months ago


samgordon

I would try to deploy it myself but Railway has horrible caching policies and I won't be able to deploy this repository for a while. Can you try setting your start command to be `sleep 999999`, ssh into the container, and try to find where the .next directory or any build directory is located?

varunteja007006
HOBBYOP

8 months ago

Thanks that sleep command did help i dont see the .next folder when I ssh into the container. Its strange I am not sure if I have to update my deploy logic or something wrong with the way RAILPACK works. What do you suggest?


varunteja007006
HOBBYOP

8 months ago

Had to update the script for it to work. Must be the way railpack reads the script i guess.

Thanks a lot Sam

Attachments


8 months ago

Glad to hear you got it fixed!


Status changed to Solved samgordon 8 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...