Environment variables set by flyctl secrets

Hello!

I’m not sure, since I don’t do much React / Firebase - What code is interacting with firebase? Is it:

  1. Frontend React code?
  2. or Backend NodeJS api code (the API that react is calling)?

If it’s :one: then it’s likely an issue of secrets not being available by default at build-time during a deployment. Frontend code isn’t going to be able to read env vars set in the VM when run on a client’s web browser. Here are docs on making them available at build-time, so the front-end has the opportunity to write the values somewhere it can read.

If it’s :two: then something weird is going on, but I don’t think it’s related to Nginx

The Nginx config shown so far is just serving static sites, not hosting any API backend, so I suspect the issue is :one:

1 Like