Fast API from Gitlab

We have a fast API hosted on gitlab. We can not convert it to a public repo since we have a json inside with google cloud vision credentials. We can also not make a public Docker Image => same problem. Is this possible to handle with Railways?
12 Replies
Percy
Percy4mo ago
Project ID: N/A
kuraputo
kuraputoOP4mo ago
N/A
Brody
Brody4mo ago
I assume moving it to a private GitHub repo is not an option? also, not that it's my place to say but you shouldn't be storing secrets / sensitive info in Git, even privately.
kuraputo
kuraputoOP4mo ago
can we store the secret file as env in railways ? we can move to a private github repo => but we would prefere to have all on 1 platform
Brody
Brody4mo ago
you could do something like base64 the JSON file and store it as an environment variable railway can only natively deploy from GitHub, so you'd either need to use GitHub or write an gitlab action that uses the railway cli. cc @maddsua <- since he's done it
kuraputo
kuraputoOP4mo ago
gitlab acction can deploy to railways?
Brody
Brody4mo ago
yes, I will let maddsua speak on that because I haven't personally done it
maddsua
maddsua4mo ago
If you're okay with using the CLI, pretty much all you need is to run railway up in CI I am not sure if milo has fixed CI mode tho. It will work, sure, but if that feature is not yet fixed the cli will not wait for deploy to succeed and will exit immediately oh ok I guess it's still not fixed https://github.com/railwayapp/cli/issues/517 welp, as I said, it will deploy your code, only issue is that if deploy fails to go live, it will not get reported to gitlab kinds a workaround would be to build everything on gitlab and run raiwlay up on artifacts so that there's no chance that a failed build would get reported as a successful one
Brody
Brody4mo ago
some context on that --ci issue, it possible milo's code is fine and it's instead an API permissions issue with the project token
kuraputo
kuraputoOP4mo ago
yes have similar problems will there come gitlab support from railways ? Gitlab is superior to github esp for business which can not give their code base to Microsoft or dont want
maddsua
maddsua4mo ago
yeah there's a bit of disconnect here as most solo devs or small team are on GH and the orgs that can afford GL (or know about it lol) don't really need railway in the first place I use railway for my personal projects, yes, but my org manages their own infra can't find link to the thread basically, it had some upvotes but the team isn't super interested in it, because they made railway rely too heavily on github specific functionality
kuraputo
kuraputoOP4mo ago
yes i see it the same way => you are very based on github
Want results from more Discord servers?
Add your server