From becf6ad7a4a920c414b9f2fea632b32598c3d817 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 3 Sep 2025 12:00:15 +0200 Subject: [PATCH] Fix wrong firebase bucket name --- backend/api/README.md | 2 +- backend/api/main.tf | 6 +++++- backend/firebase/firebase.json | 2 +- common/src/envs/dev.ts | 20 -------------------- common/src/envs/prod.ts | 4 ++-- dev.sh => run_local.sh | 0 6 files changed, 9 insertions(+), 25 deletions(-) rename dev.sh => run_local.sh (100%) diff --git a/backend/api/README.md b/backend/api/README.md index c3756c3f..0cf003ae 100644 --- a/backend/api/README.md +++ b/backend/api/README.md @@ -105,7 +105,7 @@ For Compass, the name of the secrets are in [secrets.ts](../../common/src/secret In root directory, run the local api with hot reload, along with all the other backend and web code. ```bash -./dev.sh prod +./run_local.sh prod ``` ### Deploy diff --git a/backend/api/main.tf b/backend/api/main.tf index f99c00a5..9ba5f196 100644 --- a/backend/api/main.tf +++ b/backend/api/main.tf @@ -34,7 +34,11 @@ provider "google" { # Firebase Storage Buckets # Note you still have to deploy the rules: `firebase deploy --only storage` resource "google_storage_bucket" "public_storage" { - name = "compass-130ba-public" + # /!\ That bucket is different from the one in firebase (compass-130ba.firebasestorage.app) + # as it errors when trying to do so: + # Error: googleapi: Error 403: Another user owns the domain compass-130ba.firebasestorage.app or a parent domain. You can either verify domain ownership at https://search.google.com/search-console/welcome?new_domain_name=compass-130ba.firebasestorage.app or find the current owner and ask that person to create the bucket for you, forbidden + # To be fixed later if they must be the same bucket (shared resources) + name = "compass-130ba" location = "US" force_destroy = false diff --git a/backend/firebase/firebase.json b/backend/firebase/firebase.json index dcf79863..f41fee6b 100644 --- a/backend/firebase/firebase.json +++ b/backend/firebase/firebase.json @@ -1,7 +1,7 @@ { "storage": [ { - "bucket": "compass-130ba-public", + "bucket": "compass-130ba.firebasestorage.app", "rules": "storage.rules" }, { diff --git a/common/src/envs/dev.ts b/common/src/envs/dev.ts index 0d3413e5..c497a4e8 100644 --- a/common/src/envs/dev.ts +++ b/common/src/envs/dev.ts @@ -2,24 +2,4 @@ import { EnvConfig, PROD_CONFIG } from './prod' export const DEV_CONFIG: EnvConfig = { ...PROD_CONFIG, - domain: 'compassmeet.com', - firebaseConfig: { - apiKey: "AIzaSyAxzhj6bZuZ1TCw9xzibGccRHXiRWq6iy0", - authDomain: "compass-130ba.firebaseapp.com", - projectId: "compass-130ba", - storageBucket: "compass-130ba-public", - messagingSenderId: "253367029065", - appId: "1:253367029065:web:b338785af99d4145095e98", - measurementId: "G-2LSQYJQE6P", - region: 'us-west1', - privateBucket: 'compass-private.firebasestorage.app', - }, - cloudRunId: 'w3txbmd3ba', - cloudRunRegion: 'uc', - supabaseInstanceId: 'ltzepxnhhnrnvovqblfr', - supabaseAnonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imx0emVweG5oaG5ybnZvdnFibGZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTU5NjczNjgsImV4cCI6MjA3MTU0MzM2OH0.pbazcrVOG7Kh_IgblRu2VAfoBe3-xheNfRzAto7xvzY', - apiEndpoint: 'api.compassmeet.com', - adminIds: [ - '0vaZsIJk9zLVOWY4gb61gTrRIU73', // Martin - ], } diff --git a/common/src/envs/prod.ts b/common/src/envs/prod.ts index 179f8cea..51fe3743 100644 --- a/common/src/envs/prod.ts +++ b/common/src/envs/prod.ts @@ -36,12 +36,12 @@ export const PROD_CONFIG: EnvConfig = { apiKey: "AIzaSyAxzhj6bZuZ1TCw9xzibGccRHXiRWq6iy0", authDomain: "compass-130ba.firebaseapp.com", projectId: "compass-130ba", - storageBucket: "compass-130ba-public", + storageBucket: "compass-130ba.firebasestorage.app", + privateBucket: 'compass-private.firebasestorage.app', messagingSenderId: "253367029065", appId: "1:253367029065:web:b338785af99d4145095e98", measurementId: "G-2LSQYJQE6P", region: 'us-west1', - privateBucket: 'compass-private.firebasestorage.app', }, cloudRunId: 'w3txbmd3ba', cloudRunRegion: 'uc', diff --git a/dev.sh b/run_local.sh similarity index 100% rename from dev.sh rename to run_local.sh