#Using JSON File as Environment variable in Railway for Firebase

36 messages · Page 1 of 1 (latest)

upper crater
#

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?

sour mulchBOT
#

Project ID: N/A

upper crater
#

This is for python FastAPI project and not nodejs project.

sturdy notch
#

Ope

#

Use dockerfile

#

Or make your build command something like

#

echo $GOOGLE_JSON >> file.json && normal_build_command

upper crater
#

ok, I already have docker file. Do you have example code snippet copy contents env variable to local file.json ?

sturdy notch
#

???

#

I just gave you it

#

Just use the first part

upper crater
#

cool, thank you for quick response

sturdy notch
#

Thread fixed

#

I’m @ loop_cat#7061 fr

ashen wraith
#

i could have gave better advice in my sleep

sturdy notch
#

You were sleeping and you didn’t give any advice

#

🦴

ashen wraith
#

true, this is your thread to wreck havoc on now

sturdy notch
#

A large golden retriever spawned in @ashen wraith

ashen wraith
#

i like cats

sturdy notch
#

The floor dog

ashen wraith
#

a dog isnt a cat

sturdy notch
#

Real

sturdy notch
ashen wraith
sturdy notch
#

What

ashen wraith
#

you didnt know?

sturdy notch
ashen wraith
#

get out of your rock silly boy