all builds started failing for multiple services Dec 1.

3 months ago

I was using nixpacks 1.38 and nixpacks was updated to be incompatible. Also the UI server settings are forcing me to use metal, and not letting me downgrade. SO i have no way to revert to a working build setting. I have tried multiple changes to get it working again, but i can't build my system, which is mixed python and react. I currently have not figured out how to get my systems working and when I updated one of them, you destroyed the working configuration and so that site is just down now.

$10 Bounty

10 Replies

Railway
BOT

3 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


3 months ago

Hmmm, could I get a bit more info on this? Not quite sure I'm tracking exactly so would love to hear more about this.

Currently it looks like theres a build going on that appears to be going along just fine.


Status changed to Awaiting User Response Railway 3 months ago


3 months ago

i keep chipping away at it- i finally made it past build to deploy- so i am using your env setting via variables, and i get things like this stil:

ecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "SECRET_KEY") (line 12)(https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/) details: Sensitive data should not be used in the ARG or ENV commands

Current deploy issue:

ModuleNotFoundError: No module named 'fastapi'

Traceback (most recent call last):

File "/app/main.py", line 1, in <module>

from fastapi import FastAPI, HTTPException, Depends, status

ModuleNotFoundError: No module named 'fastapi'

Traceback (most recent call last):


Status changed to Awaiting Railway Response Railway 3 months ago


3 months ago

Oh interesting, it looks like its failing to install for some reason hmm.
Looking at your custom build command it looks like its running npm install in a frontend directory but running a python command to start the app. I'd look into splitting that up into defined stages where the install stage installs all you need and the build stage builds.


Status changed to Awaiting User Response Railway 3 months ago


3 months ago

I am serving the api and the frontend in the same monorepo, so it is both


Status changed to Awaiting Railway Response Railway 3 months ago


3 months ago

Are you serving them from the same service too? I'd highly suggest splitting them up into 2 services as you will have some issues trying to run in tandem.


Status changed to Awaiting User Response Railway 3 months ago


3 months ago

i have been able to do it for multiple projects up til Dec 1. I will have to split them if i can't do it any other way.


Status changed to Awaiting Railway Response Railway 3 months ago


3 months ago

A bit odd that its not still working if it was before however for debugging purposes its quite hard for me to see the root issue if there are multiple processes running at once. Note that I don't see anything terribly wrong with builders it just seems like a command mismatch. I'd be happy to raise this to the community so they can guide you on the splitting up process.


Status changed to Awaiting User Response Railway 3 months ago


3 months ago

i can split it up, but hopefully won't have to yet- basically i have a fastapi service that serves out the compiled react frontend as static content- once it is built it works great


Status changed to Awaiting Railway Response Railway 3 months ago


3 months ago

So i finally had to abandon using nixpacks to make this work. previouslly i has some variation of:

{

"$schema": "https://railway.app/railway.schema.json",

"build": {

"builder": "NIXPACKS",

"buildCommand": "pip install -r requirements.txt && cd frontend && NPM_CONFIG_PRODUCTION=false npm install && npm run build"

},

"deploy": {

"startCommand": "python main.py"

}

for my railway.json but I had to switch to using a dockerfile now and everything works fine. Thanks for your help!


Status changed to Solved ray-chen 3 months ago


Status changed to Open ray-chen 3 months ago


Loading...