You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will require a mongodb database to be setup. You can set one up at https://cloud.mongodb.com/
30
32
31
-
This project also uses firebase auth for authentication. You can set one up at https://firebase.google.com/ and deployment is handled with DigitalOcean. See the authentication and deployment sections for more info.
33
+
This project also uses firebase auth for authentication. You can set one up at https://firebase.google.com/ and deployment is handled with DigitalOcean. See the [Firebase Auth](#firebase-auth) section for more info on setting up your credentials and project.
32
34
33
35
## ESM Node
34
36
@@ -54,7 +56,7 @@ npm i
54
56
npm run dev
55
57
56
58
# view it running on localhost
57
-
curl localhost:3000
59
+
curl localhost:4000
58
60
```
59
61
60
62
Be sure to configure the .env file with the correct values and make sure you have a mongodb database setup and firebase application credentials.
When building with Docker locally it will require the service account key in the project root; this is because the Dockerfile is copying the service account key file into the image. See the [Firebase Auth](#firebase-auth) section for more info on the service account key file and Google Application Credentials.
101
+
When building with Docker locally it will require the service account key to be set; this is because the Dockerfile is copying the service account key file into the image. See the [Firebase Auth](#firebase-auth) section for more info on the service account key file and Google Application Credentials.
100
102
101
103
## Database
102
104
@@ -146,6 +148,9 @@ Sign in with email and password is supported out of the box with Firebase Auth.
@@ -177,7 +182,7 @@ A claim is defined when the user is created which defines the user's role and pe
177
182
178
183
This project uses Firebase Auth for authentication. The firebase admin sdk is used to verify the token and decode the claims.
179
184
180
-
Because we are not running in a google environment we need to initialize the firebase admin sdk with a service account key file.
185
+
Because we are not running in a google environment we need to initialize the firebase admin sdk with a service account key file. see the [Firebase Admin SDK docs](https://firebase.google.com/docs/admin/setup#initialize_the_sdk_in_non-google_environments) for more info.
181
186
182
187
This requires a service account key file at `$HOME/gcloud.json`. The `GOOGLE_APPLICATION_CREDENTIALS` env variable must be set to the path of the service account key file.
183
188
@@ -187,6 +192,8 @@ You can create a service account from the firebase console and place in your hom
You can also set this in the `.env` file but if you have set the env variable in your shell it will take precedence.
196
+
190
197
When running in CI/CD the service account key file is stored as a secret and the env variable is set in the Dockerfile using the copied service account key file fron secrets.
0 commit comments