R
Railway16mo ago
CrawKatt

Problems deploying Discord Bot written in Rust in Railway

Hi, I'm new to Railway and it's the first time I use Railway, I tried to deploy my Discord Bot from my GitHub repository and I got this error stating that Cmake is not installed but I don't understand what I should do to fix that problem. I leave the build log below (the text is very long, so I have to send it as one file): thank you very much in advance proyect id: 142f2800-5554-446f-a489-23797460545a
Solution:
```dockerfile FROM rust:1.71.0-slim RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential ...
Jump to solution
107 Replies
Percy
Percy16mo ago
Project ID: 142f2800-5554-446f-a489-23797460545a
Brody
Brody16mo ago
add a nixpacks.toml file with this to your project
[phases.setup]
nixPkgs = ["...", "cmake"]
[phases.setup]
nixPkgs = ["...", "cmake"]
CrawKatt
CrawKatt16mo ago
I just added the file but it still gives the same problem ;-;
Brody
Brody16mo ago
well I'm out of ideas
eirk
eirk16mo ago
seems like its the crate audiopus is upset it probs has a c/c++ api so it needs cmake to build
CrawKatt
CrawKatt16mo ago
the problem is how to install cmake on railway? 😅 in my PC works perfectly
eirk
eirk16mo ago
i think u shoudl use a dockerfile
Brody
Brody16mo ago
lets try installing with apt instead of nix
[phases.setup]
aptPkgs = ["...", "cmake"]
[phases.setup]
aptPkgs = ["...", "cmake"]
CrawKatt
CrawKatt16mo ago
the same thing happens ;-; I have a dockerfile although I'm new to Docker so I'm not sure if it's right. 😅
Brody
Brody16mo ago
then im going with eirk's recommendation bruh that would have been good to know
CrawKatt
CrawKatt16mo ago
😅
Brody
Brody16mo ago
these nixpacks.toml files would have done nothing send the dockerfile please
Brody
Brody16mo ago
its not doing anything special, delete it
CrawKatt
CrawKatt16mo ago
now i have this error:
==============
Using Nixpacks
==============

context: 44cb3a86430f97ac21b5537a9f75af87

Nixpacks file based configuration is experimental and may change



╔══════════════════════════════ Nixpacks v1.11.0 ══════════════════════════════╗
║ build │ cargo run ║
║──────────────────────────────────────────────────────────────────────────────║
║ setup │ binutils, gcc, (rust-bin.stable.latest.default.override { ║
║ │ targets = ["x86_64-unknown-linux-musl"]; }), musl, musl.dev, ║
║ │ cmake ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ ./bin/ryuko_bot_discord ║
╚══════════════════════════════════════════════════════════════════════════════╝


#1 [internal] load build definition from Dockerfile

#1 transferring dockerfile: 2.15kB done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

Dockerfile:12
-------------------
10 |
11 | ARG NIXPACKS_METADATA RAILWAY_DEPLOYMENT_ID RAILWAY_ENVIRONMENT RAILWAY_ENVIRONMENT_ID RAILWAY_GIT_AUTHOR RAILWAY_GIT_BRANCH RAILWAY_GIT_COMMIT_MESSAGE RAILWAY_GIT_COMMIT_SHA RAILWAY_GIT_REPO_NAME RAILWAY_GIT_REPO_OWNER RAILWAY_PROJECT_ID RAILWAY_SERVICE_ID RAILWAY_SERVICE_NAME RAILWAY_SERVICE_RYUKOBOT_URL RAILWAY_SNAPSHOT_ID RAILWAY_STATIC_URL ROCKET_ADDRESS
12 | >>> ENV =$ NIXPACKS_METADATA=$NIXPACKS_METADATA RAILWAY_DEPLOYMENT_ID=$RAILWAY_DEPLOYMENT_ID RAILWAY_ENVIRONMENT=$RAILWAY_ENVIRONMENT RAILWAY_ENVIRONMENT_ID=$RAILWAY_ENVIRONMENT_ID RAILWAY_GIT_AUTHOR=$RAILWAY_GIT_AUTHOR RAILWAY_GIT_BRANCH=$RAILWAY_GIT_BRANCH RAILWAY_GIT_COMMIT_MESSAGE=$RAILWAY_GIT_COMMIT_MESSAGE RAILWAY_GIT_COMMIT_SHA=$RAILWAY_GIT_COMMIT_SHA RAILWAY_GIT_REPO_NAME=$RAILWAY_GIT_REPO_NAME RAILWAY_GIT_REPO_OWNER=$RAILWAY_GIT_REPO_OWNER RAILWAY_PROJECT_ID=$RAILWAY_PROJECT_ID RAILWAY_SERVICE_ID=$RAILWAY_SERVICE_ID RAILWAY_SERVICE_NAME=$RAILWAY_SERVICE_NAME RAILWAY_SERVICE_RYUKOBOT_URL=$RAILWAY_SERVICE_RYUKOBOT_URL RAILWAY_SNAPSHOT_ID=$RAILWAY_SNAPSHOT_ID RAILWAY_STATIC_URL=$RAILWAY_STATIC_URL ROCKET_ADDRESS=$ROCKET_ADDRESS
13 |
14 | # build phase
-------------------
ERROR: failed to solve: dockerfile parse error on line 12: ENV names can not be blank

Error: Docker build failed
==============
Using Nixpacks
==============

context: 44cb3a86430f97ac21b5537a9f75af87

Nixpacks file based configuration is experimental and may change



╔══════════════════════════════ Nixpacks v1.11.0 ══════════════════════════════╗
║ build │ cargo run ║
║──────────────────────────────────────────────────────────────────────────────║
║ setup │ binutils, gcc, (rust-bin.stable.latest.default.override { ║
║ │ targets = ["x86_64-unknown-linux-musl"]; }), musl, musl.dev, ║
║ │ cmake ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ ./bin/ryuko_bot_discord ║
╚══════════════════════════════════════════════════════════════════════════════╝


#1 [internal] load build definition from Dockerfile

#1 transferring dockerfile: 2.15kB done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

Dockerfile:12
-------------------
10 |
11 | ARG NIXPACKS_METADATA RAILWAY_DEPLOYMENT_ID RAILWAY_ENVIRONMENT RAILWAY_ENVIRONMENT_ID RAILWAY_GIT_AUTHOR RAILWAY_GIT_BRANCH RAILWAY_GIT_COMMIT_MESSAGE RAILWAY_GIT_COMMIT_SHA RAILWAY_GIT_REPO_NAME RAILWAY_GIT_REPO_OWNER RAILWAY_PROJECT_ID RAILWAY_SERVICE_ID RAILWAY_SERVICE_NAME RAILWAY_SERVICE_RYUKOBOT_URL RAILWAY_SNAPSHOT_ID RAILWAY_STATIC_URL ROCKET_ADDRESS
12 | >>> ENV =$ NIXPACKS_METADATA=$NIXPACKS_METADATA RAILWAY_DEPLOYMENT_ID=$RAILWAY_DEPLOYMENT_ID RAILWAY_ENVIRONMENT=$RAILWAY_ENVIRONMENT RAILWAY_ENVIRONMENT_ID=$RAILWAY_ENVIRONMENT_ID RAILWAY_GIT_AUTHOR=$RAILWAY_GIT_AUTHOR RAILWAY_GIT_BRANCH=$RAILWAY_GIT_BRANCH RAILWAY_GIT_COMMIT_MESSAGE=$RAILWAY_GIT_COMMIT_MESSAGE RAILWAY_GIT_COMMIT_SHA=$RAILWAY_GIT_COMMIT_SHA RAILWAY_GIT_REPO_NAME=$RAILWAY_GIT_REPO_NAME RAILWAY_GIT_REPO_OWNER=$RAILWAY_GIT_REPO_OWNER RAILWAY_PROJECT_ID=$RAILWAY_PROJECT_ID RAILWAY_SERVICE_ID=$RAILWAY_SERVICE_ID RAILWAY_SERVICE_NAME=$RAILWAY_SERVICE_NAME RAILWAY_SERVICE_RYUKOBOT_URL=$RAILWAY_SERVICE_RYUKOBOT_URL RAILWAY_SNAPSHOT_ID=$RAILWAY_SNAPSHOT_ID RAILWAY_STATIC_URL=$RAILWAY_STATIC_URL ROCKET_ADDRESS=$ROCKET_ADDRESS
13 |
14 | # build phase
-------------------
ERROR: failed to solve: dockerfile parse error on line 12: ENV names can not be blank

Error: Docker build failed
Brody
Brody16mo ago
show me a screenshot of your service variables
CrawKatt
CrawKatt16mo ago
enviorment variables?
Brody
Brody16mo ago
service variables
CrawKatt
CrawKatt16mo ago
Where can I get them? 😅
Brody
Brody16mo ago
from the service on railway
CrawKatt
CrawKatt16mo ago
Brody
Brody16mo ago
bruh what is that what is .env for
CrawKatt
CrawKatt16mo ago
ohh, I think the token did not go there 😅 😭
Brody
Brody16mo ago
delete it
CrawKatt
CrawKatt16mo ago
ok
CrawKatt
CrawKatt16mo ago
now i have this error:
CrawKatt
CrawKatt16mo ago
Brody
Brody16mo ago
[phases.setup]
nixPkgs = ["...", "cmake", "openssl"]
[phases.setup]
nixPkgs = ["...", "cmake", "openssl"]
CrawKatt
CrawKatt16mo ago
i have this error:
CrawKatt
CrawKatt16mo ago
[phases.setup]
aptPkgs = ["...", "cmake", "openssl", "openssl-sys"]
[phases.setup]
aptPkgs = ["...", "cmake", "openssl", "openssl-sys"]
I guess it goes like this now right?
Brody
Brody16mo ago
try this
CrawKatt
CrawKatt16mo ago
I tried it this way and it gave me the error I just posted. I have not yet upgraded with "openssl-sys". ohh, nixpgs i understand now
CrawKatt
CrawKatt16mo ago
the same
CrawKatt
CrawKatt16mo ago
you may need to add openssl-sys
Brody
Brody16mo ago
openssl-sys is not a nix package
CrawKatt
CrawKatt16mo ago
maybe it is libssl-dev
Brody
Brody16mo ago
thats also not a nix packages
eirk
eirk16mo ago
did you code this bot
Brody
Brody16mo ago
you can try them as apt packages though
CrawKatt
CrawKatt16mo ago
yes, locally on mi PC works perfectly ok
Brody
Brody16mo ago
[phases.setup]
aptPkgs = ["...", "cmake", "openssl", "libssl-dev"]
[phases.setup]
aptPkgs = ["...", "cmake", "openssl", "libssl-dev"]
CrawKatt
CrawKatt16mo ago
now i have this error:
CrawKatt
CrawKatt16mo ago
ahh, I don't know why copying copies incompletely ;-;
Brody
Brody16mo ago
skill issue?
CrawKatt
CrawKatt16mo ago
maybe it's a bug in my Arch Linux, sometimes these things happen to me.
Brody
Brody16mo ago
common linux L
CrawKatt
CrawKatt16mo ago
#13 3.074 error: failed to run custom build command for `openssl-sys v0.9.90`
#13 3.074
#13 3.074 Caused by:
#13 3.075 process didn't exit successfully: `/app/target/debug/build/openssl-sys-92d397afd81c19e3/build-script-main` (exit status: 101)
#13 3.075 --- stdout
#13 3.075 cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
#13 3.075 X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
#13 3.075 OPENSSL_LIB_DIR unset
#13 3.075 cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
#13 3.075 X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
#13 3.075 OPENSSL_INCLUDE_DIR unset
#13 3.075 cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
#13 3.075 X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_DIR
#13 3.075 OPENSSL_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
#13 3.075 cargo:rerun-if-env-changed=HOST_PKG_CONFIG
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_STATIC
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
#13 3.074 error: failed to run custom build command for `openssl-sys v0.9.90`
#13 3.074
#13 3.074 Caused by:
#13 3.075 process didn't exit successfully: `/app/target/debug/build/openssl-sys-92d397afd81c19e3/build-script-main` (exit status: 101)
#13 3.075 --- stdout
#13 3.075 cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
#13 3.075 X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
#13 3.075 OPENSSL_LIB_DIR unset
#13 3.075 cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
#13 3.075 X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
#13 3.075 OPENSSL_INCLUDE_DIR unset
#13 3.075 cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
#13 3.075 X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_DIR
#13 3.075 OPENSSL_DIR unset
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
#13 3.075 cargo:rerun-if-env-changed=HOST_PKG_CONFIG
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_STATIC
#13 3.075 cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
#13 3.075 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
Brody
Brody16mo ago
dockerfile time
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
openssl \
libssl-dev

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/bin/ryuko_bot_discord"]
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
openssl \
libssl-dev

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/bin/ryuko_bot_discord"]
Brody
Brody16mo ago
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/bin/ryuko_bot_discord"]
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/bin/ryuko_bot_discord"]
CrawKatt
CrawKatt16mo ago
now is cmake 😭
#9 ERROR: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101
-----
> [5/5] RUN cargo build --release:
#9 29.86 CMakeLists.txt:5 (get_package_version)
#9 29.86
#9 29.86
#9 29.86 CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
#9 29.86 thread 'main' panicked at '
#9 29.86 command did not execute successfully, got: exit status: 1

#9 29.86
#9 29.86 build script failed, must exit now', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5
#9 29.86 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
#9 29.86 warning: build failed, waiting for other jobs to finish...
-----
Dockerfile:13
-------------------
11 | COPY . .
12 |
13 | >>> RUN cargo build --release
14 |
15 | ENTRYPOINT ["/bin/ryuko_bot_discord"]

-------------------
ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101

#9 ERROR: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101
-----
> [5/5] RUN cargo build --release:
#9 29.86 CMakeLists.txt:5 (get_package_version)
#9 29.86
#9 29.86
#9 29.86 CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
#9 29.86 thread 'main' panicked at '
#9 29.86 command did not execute successfully, got: exit status: 1

#9 29.86
#9 29.86 build script failed, must exit now', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5
#9 29.86 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
#9 29.86 warning: build failed, waiting for other jobs to finish...
-----
Dockerfile:13
-------------------
11 | COPY . .
12 |
13 | >>> RUN cargo build --release
14 |
15 | ENTRYPOINT ["/bin/ryuko_bot_discord"]

-------------------
ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101

Brody
Brody16mo ago
well get there, hopefully
Solution
Brody
Brody16mo ago
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/bin/ryuko_bot_discord"]
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/bin/ryuko_bot_discord"]
CrawKatt
CrawKatt16mo ago
that worked 😄
Brody
Brody16mo ago
now put your discord bot token in the service variables
CrawKatt
CrawKatt16mo ago
ok, thank you very so much and i sorry for the inconvenience with me 😅
Brody
Brody16mo ago
no worries
CrawKatt
CrawKatt16mo ago
ups ========================= Container failed to start =========================  Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/ryuko_bot_discord": stat /bin/ryuko_bot_discord: no such file or directory: unknown 😅
Brody
Brody16mo ago
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/app/bin/ryuko_bot_discord"]
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/app/bin/ryuko_bot_discord"]
CrawKatt
CrawKatt16mo ago
the same error, maybe it is in the target folder. the last line is supposed to execute the binary, right?
Brody
Brody16mo ago
when you run cargo build --release locally, where does the bin end up and what's the name of it
CrawKatt
CrawKatt16mo ago
a moment please, I compiling with release
CrawKatt
CrawKatt16mo ago
CrawKatt
CrawKatt16mo ago
target/release/ryuko_bot_discord
Brody
Brody16mo ago
cool
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/app/target/release/ryuko_bot_discord"]
FROM rust:1.71.0-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
openssl \
libssl-dev \
pkg-config

WORKDIR /app

COPY . .

RUN cargo build --release

ENTRYPOINT ["/app/target/release/ryuko_bot_discord"]
CrawKatt
CrawKatt16mo ago
now it works
Brody
Brody16mo ago
are you sure
CrawKatt
CrawKatt16mo ago
now I just have to add my token and the ytp-dl and FFmpeg dependencies. thread 'main' panicked at 'Missing DISCORD_TOKEN env var, see README for more information.: NotPresent', src/main.rs:69:18 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace it works
Brody
Brody16mo ago
downloading YouTube videos is very much not allowed on railway
CrawKatt
CrawKatt16mo ago
ohh
Brody
Brody16mo ago
you don't be able to host your bot on railway all this just for me to end up telling you that you can't host the bot on railway
CrawKatt
CrawKatt16mo ago
Well, never mind, that was just for the music commands but I can do without that.
Brody
Brody16mo ago
yep remove functionality that downloads from YouTube, or any other functionality that does things you're not supposed to, and then you're fine
CrawKatt
CrawKatt16mo ago
ok, thank you very much for the help
Brody
Brody16mo ago
add your token to the service variables
CrawKatt
CrawKatt16mo ago
with " " or without " "?
Brody
Brody16mo ago
without quotes send me a screenshot just to make sure
CrawKatt
CrawKatt16mo ago
I added the token without quotes
Brody
Brody16mo ago
screenshot please to clarify, I am not asking to see the token itself, please keep that hidden
CrawKatt
CrawKatt16mo ago
Brody
Brody16mo ago
why are you calling it .env I don't understand
CrawKatt
CrawKatt16mo ago
I thought that was to create the file and that it would give the name assigned there. 😅 sorry i am a bit new to deploys.
Brody
Brody16mo ago
it's a bot token, so the name should be DISCORD_TOKEN like the error message told you
CrawKatt
CrawKatt16mo ago
I just realized and fixed it 😅
CrawKatt
CrawKatt16mo ago
now it works
Brody
Brody16mo ago
remove any build or start commands you may have set in the service settings
CrawKatt
CrawKatt16mo ago
no compile or start command in the configuration 👍🏻
Brody
Brody16mo ago
your screenshot said otherwise
CrawKatt
CrawKatt16mo ago
ohh maybe it's the nixpacks because I haven't removed it yet. 😅
Brody
Brody16mo ago
or you have set a build command in the service settings
CrawKatt
CrawKatt16mo ago
Brody
Brody16mo ago
well delete your nixpacks.toml and see if that warning goes away
CrawKatt
CrawKatt16mo ago
ok did not disappear, maybe it is because of the RUN cargo build --release
Brody
Brody16mo ago
not because of that show me your current railway.json please
CrawKatt
CrawKatt16mo ago
that's in the service? because I don't have a railway.json in my project 😅
Brody
Brody16mo ago
you can see this in the details tab
CrawKatt
CrawKatt16mo ago
JSON
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"buildCommand": "cargo run",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "NEVER"
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"buildCommand": "cargo run",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "NEVER"
}
}
Brody
Brody16mo ago
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "NEVER"
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "NEVER"
}
}
now save that as a railway.json file in your project
CrawKatt
CrawKatt16mo ago
the strange thing is that it keeps on giving this warning but it already recognizes the json and for some reason the run charge is added on its own
Brody
Brody16mo ago
does the JSON in the details tab have a cargo run build command?
CrawKatt
CrawKatt16mo ago
JSON

{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"buildCommand": "cargo run",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "NEVER"
}
}
JSON

{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"buildCommand": "cargo run",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "NEVER"
}
}
the "cargo run" is added by itself.
CrawKatt
CrawKatt16mo ago
GitHub
RyukoBot/railway.json at main · CrawKatt/RyukoBot
Bot de Discord con funciones y características similares a TeloxBot y mucho más - CrawKatt/RyukoBot
Brody
Brody16mo ago
odd but it works, so all good, it's just a warning and has no effect on anything at all
CrawKatt
CrawKatt16mo ago
ok, thank you very much and i sorry for the problems with me 😅
Brody
Brody16mo ago
no worries!
Want results from more Discord servers?
Add your server