How to set the path for the file in the environment variable of the App platform. Do we need to specify use Component-Specific Variables. My file is in base directory of the project with the name service-account.json . I know how to do it in droplet but app platform is different. I could not find a way to do it in app platform?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

👋🏼 @sbansal793

Your git repo is cloned to /workspace. This is also where your code will be located at runtime. Your app is also started with the current working directory of /workspace.

Depending on how your code is set up, you can either use the path ./service-account.json or /workspace/service-account.json.

Is this what you meant?

  • This is what I meant. So the key would be the name of the environment variable and value would be ./servixe-account.json. Should the value be in quotes or {} or without any brackets?

    • Yes exactly. The key is the name. The environment value will be passed to your app exactly the way you enter it in the field so if you include quotes they will show up in the value. So it should be ./service-account.json like you said.

      The only exception is if you use bindable env vars which will be replaced by their actual values before being passed to your app. For example, if the value contains ${APP_URL} it will be replaced by your app URL e.g.