Can I deploy a monorepo using the Railway CLI
eastgold15
HOBBYOP

11 days ago

bun +elyisa +nuxt +monorepo next * 2

Solved$10 Bounty

15 Replies

Status changed to Awaiting Railway Response Railway 11 days ago


eastgold15
HOBBYOP

11 days ago

https://github.com/eastgold15/shop2.git Can you help me with the deployment? I think I've done a terrible job.


eastgold15
HOBBYOP

11 days ago

I want to use the CLI to deploy. I previously entered a single app to deploy, but it reported an error directly due to missing dependencies. I can only install the dependencies at the outermost level and then go inside to deploy.


eastgold15
HOBBYOP

11 days ago

you see

Attachments


eastgold15
HOBBYOP

11 days ago

I think this approach results in the installation of unnecessary dependencies during each deployment


eastgold15
HOBBYOP

11 days ago

Thank you. You're so amazing. You finished reading the project in just a few minutes and type so fast. Worship!!


eastgold15
HOBBYOP

11 days ago

I'm not very familiar with Docker and Turbo Prune. I'm looking forward to seeing what it would be like if it were deployed using Docker + Turbo. If it's too much trouble for you, forget it.


eastgold15
HOBBYOP

11 days ago

pwshrailway link                                                                  
> Select a workspace PoRi's Projects                                              
> Select a project shop 全栈项目
> Select an environment production
> Select a service <esc to skip> web 复合项目

Project shop 全栈项目 linked successfully! 🎉
pwshrailway variables --set "RAILWAY_ROOT_DIRECTORY=apps/b2b-api" --service b2b-api                                                                                 
Service 'b2b-api' not found   

不知道为什么找不到,我已经修改了railway.json

eastgold15
HOBBYOP

11 days ago

404


eastgold15
HOBBYOP

11 days ago

Got it. It's because the deployment name is incorrect. I want to ask you a question. Why do you type so fast? I want to learn from you


eastgold15
HOBBYOP

11 days ago

I am now using docker + cli for deployment. How should the web page be set up?I'm feeling dizzy and don't know what the relationship is between the cli and the page.

Attachments


eastgold15
HOBBYOP

11 days ago

{ "message": "[pruner 5/5] RUN turbo prune web --docker", "timestamp": "2026-02-28T09:56:57.985632387Z", "severity": "error", "children": [ { "message": " WARNING No locally installed turbo found in your repository. Using globally installed version (2.8.12), which can cause unexpected behavior.\n\nInstalling the version in your repository (^2.7.3) before calling turbo will result in more predictable behavior across environments.\n", "timestamp": "2026-02-28T09:56:58.340147742Z" }, { "message": "\nAttention:\nTurborepo now collects completely anonymous telemetry regarding usage.\nThis information is used to shape the Turborepo roadmap and prioritize features.\nYou can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:\nhttps://turborepo.dev/docs/telemetry\n\n", "timestamp": "2026-02-28T09:56:58.353345436Z" }, { "message": "• turbo 2.8.12\n", "timestamp": "2026-02-28T09:56:58.353471085Z" }, { "message": " WARNING An issue occurred while attempting to parse /app/bun.lock. Turborepo will still function, but some features may not be available:\n x Could not resolve workspaces.\n `-> Lockfile not found at /app/bun.lock\n\n", "timestamp": "2026-02-28T09:56:58.380511992Z" }, { "message": " x Cannot prune without parsed lockfile.\n\n", "timestamp": "2026-02-28T09:56:58.383289762Z" } ] } docker file error?


eastgold15
HOBBYOP

11 days ago

[builder 7/7] RUN cd apps/web && bun run build $ NODE_ENV=production bun next build Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry ▲ Next.js 16.1.5 (Turbopack) Creating an optimized production build ... ✓ Compiled successfully in 8.5s Running TypeScript ... Collecting page data using 31 workers ... x emoji Invalid environment variables: [ { expected: "string", code: "invalid_type", path: [ "DATABASE_URL" ], message: "Invalid input: expected string, received undefined", }, { expected: "string", code: "invalid_type", path: [ "DOMAIN" ], message: "Invalid input: expected string, received undefined", } ] Error: Failed to collect configuration for /_not-found at processTicksAndRejections (null) at processTicksAndRejections (null) { [cause]: Error: Invalid environment variables at <anonymous> (.next/server/chunks/ssr/_0c4b2880._.js:37:173187) at <anonymous> (.next/server/chunks/ssr/_0c4b2880._.js:37:173359) at module evaluation (.next/server/chunks/ssr/_0c4b2880._.js:37:173611) at instantiateModule (.next/server/chunks/ssr/[turbopack]_runtime.js:740:9) at getOrInstantiateModuleFromParent (.next/server/chunks/ssr/[turbopack]_runtime.js:763:12) at esmImport (.next/server/chunks/ssr/[turbopack]_runtime.js:228:20) at module evaluation (.next/server/chunks/ssr/[root-of-the-server]__5e102b27._.js:4:3752) at instantiateModule (.next/server/chunks/ssr/[turbopack]_runtime.js:740:9) at getOrInstantiateModuleFromParent (.next/server/chunks/ssr/[turbopack]_runtime.js:763:12) at esmImport (.next/server/chunks/ssr/[turbopack]_runtime.js:228:20) } > Build error occurred Error: Failed to collect page data for /_not-found at processTicksAndRejections (null) at processTicksAndRejections (null) { type: 'Error' } error: "next" exited with code 1 error: script "build" exited with code 1 Do environment variables in Docker need to be redeclared?

Attachments


eastgold15
HOBBYOP

11 days ago

[builder 7/7] RUN cd apps/web && bun run build $ NODE_ENV=production bun next build Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry ▲ Next.js 16.1.5 (Turbopack) Creating an optimized production build ... ✓ Compiled successfully in 7.7s Running TypeScript ... Collecting page data using 31 workers ... Error: Failed to collect configuration for /product/[id] at processTicksAndRejections (null) { [cause]: TypeError: Cannot destructure property 'connection' from null or undefined value at n (.next/server/chunks/ssr/_0c4b2880._.js:395:121275) at <anonymous> (.next/server/chunks/ssr/_0c4b2880._.js:395:121603) at processTicksAndRejections (null) } > Build error occurred Error: Failed to collect page data for /product/[id] at processTicksAndRejections (null) { type: 'Error' } error: "next" exited with code 1 error: script "build" exited with code 1 It seems that this Next.js needs to query the database during pre-rendering. At this point, I have to provide it with a real database connection. How can I pass it in? I can't directly write the real database connection in the Dockerfile, right?


eastgold15
HOBBYOP

11 days ago

Build successful!! Thank you very much. Your answer is incisive. I will study it carefully and admire you.


Status changed to Open brody 11 days ago


Status changed to Solved brody 11 days ago


eastgold15
HOBBYOP

11 days ago

Why has the reply from the big shot to me disappeared


Status changed to Open brody 10 days ago


Status changed to Solved brody 10 days ago


Loading...