Shah
Shah
RRailway
Created by Shah on 10/16/2023 in #✋|help
Rust binary not found after build
I'm trying to run my binary, I have cargo build --release as the build step, and startCommand = "./target/release/bouncer" in my railway.toml. However in the deploy step it just says ./target/release/bouncer: No such file or directory
19 replies
RRailway
Created by Shah on 2/28/2023 in #✋|help
How to use a reverse proxy with railway
Note: Yes I know railway offers it's own reverse proxy and load balancing. I'm trying to set up a reverse proxy to front my services so that they can all "use" the same custom domain. I've got HAProxy set up, however when I try using it I actually end up hitting the railway backboard. Does anyone know how to get by this?
100 replies
RRailway
Created by Shah on 2/24/2023 in #✋|help
Set env var in dockerfile during build
I've got the following in my dockerfile
# This var simply prevents sqlx from connecting to the database at compile time
ARG SQLX_OFFLINE=0
# Copy the cargo configs from the depcache stage. We're building a fully static binary
RUN cargo build --release --target x86_64-unknown-linux-musl --bin backend
# This var simply prevents sqlx from connecting to the database at compile time
ARG SQLX_OFFLINE=0
# Copy the cargo configs from the depcache stage. We're building a fully static binary
RUN cargo build --release --target x86_64-unknown-linux-musl --bin backend
My goal here is to have the build read SQLX_OFFLINE from my variables on railway during build and set the SQLX_OFFLINE environment var for the docker build. However I only want this to be set during builds on railway, and not when running docker locally. Any guidance will be greatly appreciated!
137 replies
RRailway
Created by Shah on 2/18/2023 in #✋|help
TLS in applications
I'd like to set up TLS within my application, I'm using actix-web and want to set up rustls so I can take advantage of http/2, but I need to provide certificates to the actual application in order to do this. I know that railway's load balancer has http/2 but I need to enable it within my app as well. I can generate the certificates and all, but I'm not sure what I need to set for the X.509 information for it to be valid, using a self signed certificate causes UnknownCA exceptions when the load balancer hits the service. I'd appreciate any guidance I can get here peepoBlanketThumbs
11 replies
RRailway
Created by Shah on 2/1/2023 in #✋|help
Post build script?
I'd like to be able to run db migrations for PR environments but I'm not sure how to have a script that runs after the build step but before the start step. Any guidance for this?
84 replies
RRailway
Created by Shah on 2/1/2023 in #✋|help
Where can I find SSL certificate?
I'm running an HTTP/2 server and while the framework is able to detect and enable http2 simply from https being present, I'd like to be able to properly bind with openssl. But in order to do this I need to know the path to the cert files and I'm not sure where to find those in railway.
6 replies
RRailway
Created by Shah on 1/31/2023 in #✋|help
Unable to build: missing -lpq
I've got a rust app that uses postgres, my nixpacks.toml has the following
[phases.build]
nixPkgs = ['libpqxx']
[phases.build]
nixPkgs = ['libpqxx']
And I get the following error
cannot find -lpq: No such file or directory
cannot find -lpq: No such file or directory
Can anyone assist with this? I got around it previously by simply writing my own Dockerfile, but I wanted to see if I could use the nixpacks toml instead
8 replies