Closed tamsingreen closed 3 years ago
Stand down: see https://newslabs.slack.com/archives/C07B5URHP/p1619106881041100 (full convo in dev channel). Possibly not relevant for this ticket (see https://github.com/bbc/digital-paper-edit-infrastructure/issues/21).
If we can get one of the Firebase domains to work(https://digital-paper-edit-prod.web.app/#/), I think we can consider this done. There seems to be an issue with either rules or permissions on GCP storage; to replicate, try to upload a transcript to the url above.
Is there anything to review in the repo (config etc) for this or does it all live in Firebase?
Is there anything to review in the repo (config etc) for this or does it all live in Firebase?
I think it all lives in Firebase. I've added the runtime config to our AWS KMS parameter store; it's not used there, but is a secure place to store it and it's where the test lives. I'm not sure about the analytics setup? But everything else has been done, unless the documentation isn't clear.
I'm just raising a PR for the prod hosting config - I think that's all though!
Context
We want to have separate environments for dev and prod. Everything is currently on Dev.
Acceptance Criteria
Make an equivalent for Live.
Notes
The convention for test and live environment is "dev" and "prod" in GCP. In
.firebaserc
, you'll see:It's safe to assume none of the below services are setup for prod:
We would need to manually create these assets, with a very similar layout as the dev environment.
The only setup for prod there is is that it's in
package.json
. The way this works is that using your logged in Firebase tools, it knows the projects that you have - dev and prod. If you runfirebase deploy -P prod --only functions
- this means it's specifying the prod project you already have setup (in .firebaserc) and deploys only Functions to that project.Functions
In functions, GCP stores runtime configurations. This is where the information of assets (i.e. storage) are. You can run
firebase -P dev config:get
or something like that to get the runtime config.Hosting and others
In hosting and other spaces, you would need to look at
firebase.json
root directory to understand how the configuration is setup.You can use the
firebase deploy -P prod --only x,y,z
to deploy for any service.React
The way the React App knows where to look for the things, is also in the code under
firebase.js
. This is where the .env is loaded with necessary information to get access to the relevant project: