Using JSON File as Environment variable in Railway for Firebase

Railway only allows defining environment variables with values inline. But to authenticate with firebase, I need to use a json file like firebase-service-account.json and provide path to this file as value of env variable GOOGLE_APPLICATION_CREDENTIALS . How do I do this in build setup?
25 Replies
Percy
Percy2y ago
Project ID: N/A
Percy
Percy2y ago
⚠️ experimental feature
alex
alex2y ago
Search up npm post install
erajasekar
erajasekar2y ago
This is for python FastAPI project and not nodejs project.
alex
alex2y ago
Ope Use dockerfile Or make your build command something like echo $GOOGLE_JSON >> file.json && normal_build_command
erajasekar
erajasekar2y ago
ok, I already have docker file. Do you have example code snippet copy contents env variable to local file.json ?
alex
alex2y ago
??? I just gave you it Just use the first part
erajasekar
erajasekar2y ago
cool, thank you for quick response
alex
alex2y ago
hitmarker fixed I’m @ loop_cat#7061 fr
Brody
Brody2y ago
i could have gave better advice in my sleep
alex
alex2y ago
Cap I got here first You were sleeping and you didn’t give any advice 🦴
Brody
Brody2y ago
true, this is your thread to wreck havoc on now
alex
alex2y ago
alex
alex2y ago
A large golden retriever spawned in @Brody
Brody
Brody2y ago
i like cats
alex
alex2y ago
The floor dog
Brody
Brody2y ago
a dog isnt a cat
alex
alex2y ago
Real Real
Brody
Brody2y ago
are you excited for opera gx vtuber?
alex
alex2y ago
What??? Are What
Brody
Brody2y ago
you didnt know?
alex
alex2y ago
No
Brody
Brody2y ago
get out of your rock silly boy
alex
alex2y ago
Ok
Want results from more Discord servers?
Add your server