Pairist v2 is meant to be deployed into your own Firebase project (or that of your team/organization).
To do so, follow the steps below. It should only take 10-15 minutes.
-
Set up a Firebase project for your Pairist instance.
- Go to the Firebase console and add a new project.
- If you're using an existing GCP project, follow the prompts to select that project and add Firebase to it.
- From the console, create a new Firestore database for your project.
- Find the authentication page, click "Get started", and enable the "Email/Password" sign-in method. Don't enable the "passwordless log-in".
- Find the billing page and upgrade your project to the "Blaze - pay as you go" plan.
- Under project settings, set a "Public-facing name" for your project (e.g. "MyOrg's Pairist").
- Go to the Firebase console and add a new project.
-
Clone the Pairist repo & checkout version tag.
git clone https://github.com/pivotal-cf/pairist.git ~/workspace/pairist
cd ~/workspace/pairist
git checkout v2.0.0
(tag for whichever version you're deploying)
-
Install dependencies.
-
Install the Firebase CLI & target new Firebase project.
- Can either install with NPM (
npm install -g firebase-tools
) or as a standalone binary (curl -sL firebase.tools | bash
). More options are listed here. You must install firebase-tools < v10, as v10 requires at least Node 12. - Run
firebase login
(which will pop up a browser window to authenticate). - Run
firebase projects:list
to list your projects (which should include the one you created earlier). - Run
firebase use <your-project-id>
to target your new project.
- Can either install with NPM (
-
Run the deploy script.
-
Run
yarn deploy
from the repo directory with the following required environment variables set:PAIRIST_FIREBASE_PROJECT_ID
: this is your project ID (the one you used forfirebase use <your-project-id>
)PAIRIST_FIREBASE_API_KEY
: can be found in the Firebase console, under project settings- any other optional variables, as described in the configuration docs
-
- Problem: You get an error when deploying like:
Error: HTTP Error: 400, Billing account for project '___' is not found. Billing must be enabled for activation of service(s) 'cloudbuild.googleapis.com,containerregistry.googleapis.com' to proceed.
- Solution: In the Firebase console, make sure your project is set to the "Blaze - pay as you go" plan, not the free plan.
- Problem: You get an error when deploying like:
functions[onUserDelete(us-central1)]: Deployment error. Failed to configure trigger providers/firebase.auth/eventTypes/user.delete@firebaseauth.googleapis.com (__gcf__.us-central1.onUserDelete)
- Solution: In the Firebase console, under Authentication, make sure you have "Email/Password" sign-in method enabled (as mentioned in step 1 above).