From 82bf346ce52493d20a011a6a78b4d4de81db5d9e Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Fri, 5 Dec 2025 00:50:03 +0100 Subject: [PATCH] Improve readme --- backend/api/README.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/backend/api/README.md b/backend/api/README.md index b806f53..4004e91 100644 --- a/backend/api/README.md +++ b/backend/api/README.md @@ -65,7 +65,21 @@ gcloud compute backend-services update api-backend \ --timeout=600s ``` -#### API Deploy CD +Set up the saved search notifications job: + +```bash +gcloud scheduler jobs create http daily-saved-search-notifications \ + --schedule="0 16 * * *" \ + --uri="https://api.compassmeet.com/internal/send-search-notifications" \ + --http-method=POST \ + --headers="x-api-key=" \ + --time-zone="UTC" \ + --location=us-west1 +``` + +View it [here](https://console.cloud.google.com/cloudscheduler). + +##### API Deploy CD ```shell gcloud iam service-accounts create ci-deployer \ @@ -89,20 +103,6 @@ gcloud iam service-accounts add-iam-policy-binding \ gcloud iam service-accounts keys create keyfile.json --iam-account=ci-deployer@compass-130ba.iam.gserviceaccount.com ``` -Set up the saved search notifications job: - -```bash -gcloud scheduler jobs create http daily-saved-search-notifications \ - --schedule="0 16 * * *" \ - --uri="https://api.compassmeet.com/internal/send-search-notifications" \ - --http-method=POST \ - --headers="x-api-key=" \ - --time-zone="UTC" \ - --location=us-west1 -``` - -View it [here](https://console.cloud.google.com/cloudscheduler). - ##### DNS * After deployment, Terraform assigns a static external IP to this resource. @@ -164,8 +164,9 @@ In root directory, run the local api with hot reload, along with all the other b ### Deploy -Run in this directory to deploy your code to the server. +To deploy the backend code, simply increment the version number in [package.json](package.json) and push to the `main` branch. +Or if you have access to the project on google cloud, run in this directory: ```bash ./deploy-api.sh prod ```