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

a month ago

https://github.com/varunteja007006/open_templates/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

Hi,

Please add next build to your build command.


varunteja007006
HOBBYOP

a month 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

a month 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 thenstartCommand = "pnpm start:starter-convex"

What does build:starter-convex do?


samgordon

Hi,Please add next build to your build command.

varunteja007006
HOBBYOP

a month 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.


Yes, it is safe to upload logs.


samgordon

What does build:starter-convex do?

varunteja007006
HOBBYOP

a month 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.


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

a month ago


samgordon

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

varunteja007006
HOBBYOP

a month 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

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

a month 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

a month 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

a month 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

a month 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


Glad to hear you got it fixed!


Status changed to Solved samgordon about 1 month ago


Loading...