R
Railway

✋|help

Unchanged repo fails to deploy on env var change.

Rrdraak9/18/2023
I had this exact setup running last night, and this morning when I changed an environment variable it failed.

For debugging I made my start command this:
pwd && ls . && ls bin && ./bin/tklbot

Output from deploy logs:
/app
bin
tklbot
/bin/bash: line 1: ./bin/tklbot: No such file or directory

Which seems a little contradictory.

My full nixpacks.toml:
[phases.setup]
nixPkgs = ["binutils", "gcc", "rust-bin.stable.latest.default"]

[phases.build]
cmds = ["mkdir -p bin", "cargo build --release", "cp target/release/tklbot bin"]

[start]
cmd = "pwd && ls . && ls bin && ./bin/tklbot"


Relevant Cargo.toml sections:
(I'm building several binaries with the default /bin module naming.)
[package]
name = "tklbot"
version = "0.3.2"
edition = "2021"
default-run = "tklbot"

[lib]
name = "tklbot"
path = "src/lib.rs"

[[bin]]
name = "tklbot"
path = "src/main.rs"
Solution:
Whelp, turns out in my env var shuffle, I dropped NIXPACKS_NO_MUSL=1 which was the root cause. Things are working again. I'd normally ask for a better error but I'm not sure this one would be particularly easy to put into the system.
Jump to solution
Rrdraak9/19/2023
2090e121-cc62-4fbe-9114-5349121f7893
rolling back to the previous successful deployment also doesn't work, so I'm a little dead in the water.
Still can't figure this one out.

Poking around the image built locally with nixpacks build . shows that /bin/sh ./bin/tklbot results in cannot execute binary file. Thought that could mean it's not built for the right architecture, or that bash can't resolve the absolute path but explicitly specifying both yielded the same results.
The nixpacks documentation is pretty sparse, and there isn't much activity in the discord so I'm feeling cornered into building my own docker image before deploying.
Solution
Rrdraak9/22/2023
Whelp, turns out in my env var shuffle, I dropped NIXPACKS_NO_MUSL=1 which was the root cause. Things are working again. I'd normally ask for a better error but I'm not sure this one would be particularly easy to put into the system.

Looking for more? Join the community!

Recommended Posts
Is it possible to host Unity project?I have a unity game development project which runs C# Since I already use railway for my other projCan't see organizations reposTitle.Please my images are not displaying after deploying on railway. I am new in web development.Please I am new to web development and first time deploying to railway. I have django drf backend wiISO 27001Hi this might be a dumb question but does Railway have the ISO 27001 certification or is that irreledeploying react with viteI've deployed a react app with vite, exposing network ip but I can't access it - says Application faOpenSSL error when using Bun + PrismaGetting an error when using Bun and prisma together. Prisma requires node to work, so start command Server isnt workingThe server suddenly stopped working. Could anyone explain what is going on?...How to deploy a project with multiple dockerfiles?Have project that has one `Dockerfile` for the backend service and another one `Dockerfile.celery` fWildcard DNS let user custom there domainI would like to know how to let's my users custom domain with CNAME to my domain DNS my DOMAIN CNABun with turborepo supportHey guys, Just switched over to bun from fastify but having some trouble setting it up properly to How does pro plan upgrade works for application? particularly Spring boot app...Hi all, I find it difficult to understand how pro plan upgrade works. I upgraded my Spring boot app Deploying Rust tries to copy binaries that don't exist.I'm not using my own nixpacks.toml, and railway is attempting to copy binaries that it doesn't need Cron skipingSo my Cron Schedule keeps skipping every time?Request to free up custom domainMy project id : 5df73bd5-7d04-40dd-9e57-97f1cdd89a60 Can u pls delete the given custom domain, it sPR PreviewsHi everyone. Is it possible to setup PR previews with it's own set of environment variables?Looking for way to run LibreTranslate as a service on railwayI'm looking for a way to run https://libretranslate.com on my railway instance. Ideally it would beRTT to nearby datacenter has gone way up in the past few daysRegions have been amazing and are super helpful for our use case. We host our database in AWS us-easPublishing .net 7 app - project file not foundHi, I'm new in railway and i'm faced with file structure problem. I heared that way to publish is s