updated prod secret
This commit is contained in:
57
FIREBASE_ENV.md
Normal file
57
FIREBASE_ENV.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Firebase Environments
|
||||
|
||||
The frontend Firebase project is selected by Vite mode.
|
||||
|
||||
## Production
|
||||
|
||||
`npm run build` uses `.env.production`.
|
||||
|
||||
The current production Firebase project is:
|
||||
|
||||
```text
|
||||
whsfund-c5e40
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
`npm run dev` uses `.env.development`.
|
||||
|
||||
The development Firebase project is:
|
||||
|
||||
```text
|
||||
whsfund-dev-c5e40
|
||||
```
|
||||
|
||||
The local `.env.development` file should contain the web app config for this
|
||||
project. If it needs to be recreated:
|
||||
|
||||
```bash
|
||||
cp .env.development.example .env.development
|
||||
npm run dev
|
||||
```
|
||||
|
||||
The Shopdm Pay integration already uses the Vite mode too:
|
||||
|
||||
- development: `wesley-high-school` merchant at `https://pay-dm-dev.web.app/wesley-high-school`, pending donations marked `env: "dev"`
|
||||
- production: production merchant, production payment URL, pending donations marked `env: "production"`
|
||||
|
||||
## Firebase CLI
|
||||
|
||||
The Firebase CLI has aliases for both projects:
|
||||
|
||||
```bash
|
||||
firebase deploy --project development
|
||||
firebase deploy --project production
|
||||
```
|
||||
|
||||
Local development writes pending donations to the development Firebase project.
|
||||
To test full Shopdm Pay confirmation, deploy the Cloud Function to the
|
||||
development project, set `SHOPDM_MERCHANT_SECRET_DEV` in that project, and
|
||||
configure the Shopdm dev merchant webhook to call that development function URL.
|
||||
Firebase secrets require the development project to be on the Blaze plan.
|
||||
|
||||
Development webhook URL:
|
||||
|
||||
```text
|
||||
https://us-central1-whsfund-dev-c5e40.cloudfunctions.net/shopdmPayWebhook
|
||||
```
|
||||
Reference in New Issue
Block a user