Tiago Uabeiro
Diesel does not work on railway
Diesel is a rust ORM, i need to run the migrations on railway before starting the app, but the CLI doesnt start
nixpacks.toml:
#15 [stage-0 11/11] RUN --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/git,target=/root/.cargo/git --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/registry,target=/root/.cargo/registry /root/.cargo/bin/diesel migration run
#15 sha256:90fb84cae925ae0d62f883929b2c961ce115e861c0118a1dcf34cc63b250f743
#15 0.478 /root/.cargo/bin/diesel: error while loading shared libraries: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
#15 ERROR: executor failed running [/bin/bash -ol pipefail -c /root/.cargo/bin/diesel migration run]: exit code: 127
-----
> [stage-0 11/11] RUN --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/git,target=/root/.cargo/git --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/registry,target=/root/.cargo/registry /root/.cargo/bin/diesel migration run:
-----
executor failed running [/bin/bash -ol pipefail -c /root/.cargo/bin/diesel migration run]: exit code: 127
Error: Docker build failed
#15 [stage-0 11/11] RUN --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/git,target=/root/.cargo/git --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/registry,target=/root/.cargo/registry /root/.cargo/bin/diesel migration run
#15 sha256:90fb84cae925ae0d62f883929b2c961ce115e861c0118a1dcf34cc63b250f743
#15 0.478 /root/.cargo/bin/diesel: error while loading shared libraries: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
#15 ERROR: executor failed running [/bin/bash -ol pipefail -c /root/.cargo/bin/diesel migration run]: exit code: 127
-----
> [stage-0 11/11] RUN --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/git,target=/root/.cargo/git --mount=type=cache,id=s/c95327cd-2bfb-4943-bfb2-23352468f0a4-/root/cargo/registry,target=/root/.cargo/registry /root/.cargo/bin/diesel migration run:
-----
executor failed running [/bin/bash -ol pipefail -c /root/.cargo/bin/diesel migration run]: exit code: 127
Error: Docker build failed
[phase.name]
nixOverlays = ['https://github.com/oxalica/rust-overlay/archive/master.tar.gz']
[phases.setup]
nixPkgs = ['nodejs', "rust-bin.nightly.latest.default", "gcc", "glibc"]
aptPkgs = ['libpq-dev', 'libgssapi-krb5-2']
[phases.build]
cmds = [
'cargo install diesel_cli --no-default-features -F postgres',
'cargo build -r',
'cd marketplace && npm install && node_modules/.bin/vite build',
'/root/.cargo/bin/diesel migration run'
]
[start]
cmd = "./target/release/server"
[phase.name]
nixOverlays = ['https://github.com/oxalica/rust-overlay/archive/master.tar.gz']
[phases.setup]
nixPkgs = ['nodejs', "rust-bin.nightly.latest.default", "gcc", "glibc"]
aptPkgs = ['libpq-dev', 'libgssapi-krb5-2']
[phases.build]
cmds = [
'cargo install diesel_cli --no-default-features -F postgres',
'cargo build -r',
'cd marketplace && npm install && node_modules/.bin/vite build',
'/root/.cargo/bin/diesel migration run'
]
[start]
cmd = "./target/release/server"
239 replies