Fast API from Gitlab

maxbuyogoFREE

9 months ago

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?

0 Replies

maxbuyogoFREE

9 months ago

N/A


9 months ago

I assume moving it to a private GitHub repo is not an option?


9 months ago

also, not that it's my place to say but you shouldn't be storing secrets / sensitive info in Git, even privately.


maxbuyogoFREE

9 months ago

can we store the secret file as env in railways ?


maxbuyogoFREE

9 months ago

we can move to a private github repo => but we would prefere to have all on 1 platform


9 months ago

you could do something like base64 the JSON file and store it as an environment variable


9 months ago

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


maxbuyogoFREE

9 months ago

gitlab acction can deploy to railways?


9 months ago

yes, I will let maddsua speak on that because I haven't personally done it


maddsuaHOBBY

9 months 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


maddsuaHOBBY

9 months ago

oh ok I guess it's still not fixed



maddsuaHOBBY

9 months ago

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


maddsuaHOBBY

9 months ago

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


9 months 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


maxbuyogoFREE

9 months ago

yes have similar problems


maxbuyogoFREE

9 months ago

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


maddsuaHOBBY

9 months 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


maddsuaHOBBY

9 months ago

I use railway for my personal projects, yes, but my org manages their own infra


maddsuaHOBBY

9 months ago

can't find link to the thread


maddsuaHOBBY

9 months ago

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


maxbuyogoFREE

9 months ago

yes i see it the same way => you are very based on github