1. Click "Use this template"
2. Click Create new repository
3. Include all branches
4. Give your repository a name
6. Click "Create repository"
7. Checkout your repository
- Github CLI -
brew install gh
- Used for managing secrets and variables in Github actions - Google cloud SDK -
brew install --cask google-cloud-sdk
- Used to setup projects on GCP.- Make sure the SDK is up to date by running
gcloud components update
- Make sure the SDK is up to date by running
- Terraform
brew install terraform
- Used to manage infrastructure as code
npm install
npx fvst infra init
- This CLI script will guide you through setting up the infrastructure on GCP.- You have to set up a billing account - follow the tutorial at https://cloud.google.com/billing/docs/how-to/create-billing-account - this step asks for a credit card, but GCP will not charge the account when the free trial runs out.
- This step will take some time, it will create 2 projects (staging/production), build docker containers and deploy them.
- Setup a clerk.com account following the tutorial at Setup Clerk application
- You should have one account for staging and one account for production
- Wait for the
npx fvst infra init
script and the workflow it starts on GitHub actions to finish- The workflow will fail - we're unsure why it fails, it seems like GCP IAM policy is not applied on the first run.
- This is ok, we still need to configure the secrets for Clerk
npx fvst infra setup-secrets staging
- This scripts updates the secret values for the staging environment, you should do the same for production.- Rerun the failed jobs from the Github Actions workflow
- Open
https://console.cloud.google.com/welcome/