From c3cac3c18f9f69bb7063f23a560bef6fcb6d1bef Mon Sep 17 00:00:00 2001 From: ollie <107874766+zz-hh-aa@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:40:36 +0000 Subject: [PATCH] feat: setup Metabase env variables (#3992) --- api.planx.uk/.env.test.example | 4 ++++ docker-compose.yml | 2 ++ infrastructure/application/Pulumi.production.yaml | 2 ++ infrastructure/application/Pulumi.staging.yaml | 2 ++ infrastructure/application/index.ts | 8 ++++++++ 5 files changed, 18 insertions(+) diff --git a/api.planx.uk/.env.test.example b/api.planx.uk/.env.test.example index b2356fd300..ec234e54f9 100644 --- a/api.planx.uk/.env.test.example +++ b/api.planx.uk/.env.test.example @@ -45,3 +45,7 @@ ORDNANCE_SURVEY_API_KEY=👻 IDOX_NEXUS_TOKEN_URL=👻 IDOX_NEXUS_SUBMISSION_URL=👻 + +# Analytics +METABASE_API_KEY=👻 +METABASE_URL_EXT=metabase.example.com \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8569cc75dd..ad5c1ee0ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -145,6 +145,8 @@ services: IDOX_NEXUS_TOKEN_URL: ${IDOX_NEXUS_TOKEN_URL} JWT_SECRET: ${JWT_SECRET} MAPBOX_ACCESS_TOKEN: ${MAPBOX_ACCESS_TOKEN} + METABASE_API_KEY: ${METABASE_API_KEY} + METABASE_URL_EXT: ${METABASE_URL_EXT} MINIO_PORT: ${MINIO_PORT} ORDNANCE_SURVEY_API_KEY: ${ORDNANCE_SURVEY_API_KEY} PORT: ${API_PORT} diff --git a/infrastructure/application/Pulumi.production.yaml b/infrastructure/application/Pulumi.production.yaml index 5010c70926..00fa794df5 100644 --- a/infrastructure/application/Pulumi.production.yaml +++ b/infrastructure/application/Pulumi.production.yaml @@ -148,3 +148,5 @@ config: aws:region: eu-west-2 cloudflare:apiToken: secure: AAABAMbIBX9N21ModHyDYCQCGZXkRUP62NIUMhsxkK+/YUPRQr6PEqgZX9LRP2UuVwvVHd2RxvKGT8lpq8oAgyeDYP1eZSUl + application:metabase-api-key: + secure: AAABAAdkLyFGZJ50HENSAkvYZ9Y3Qj2oKysmBKNWbqgcCLYz+dDvgEBPTbzG6lNgOqUyySJDmquMilyiUtTLau7rpF4txEM/O4DHmAinVg== diff --git a/infrastructure/application/Pulumi.staging.yaml b/infrastructure/application/Pulumi.staging.yaml index 6e5a233278..be082e9ca8 100644 --- a/infrastructure/application/Pulumi.staging.yaml +++ b/infrastructure/application/Pulumi.staging.yaml @@ -66,3 +66,5 @@ config: certificates:cloudflare-zone-id: dc27ac531ff8862559ed9ab5016c4953 cloudflare:apiToken: secure: AAABABWhDm+7RstbxLXd1D8CcxkylHS6UKMqk4kOaY7Y0E7FJS4bZfvyGs0nks80hl3vjENH4eDuFbUgA82/sA4SmDlfpNXr + application:metabase-api-key: + secure: AAABAFf+hW09AWupsY6adrPAJHCkrTMeRX7/gaUHLYXi3QS77MVelPp9K0L4zyUL8u7zDanjuE9G/bfIlcVXLwiLLKAJkt5to9knKJqTXg== diff --git a/infrastructure/application/index.ts b/infrastructure/application/index.ts index 5e599d415d..19a55a679f 100644 --- a/infrastructure/application/index.ts +++ b/infrastructure/application/index.ts @@ -451,6 +451,14 @@ export = async () => { name: "MAPBOX_ACCESS_TOKEN", value: config.requireSecret("mapbox-access-token"), }, + { + name: "METABASE_API_KEY", + value: config.requireSecret("metabase-api-key"), + }, + { + name: "METABASE_URL_EXT", + value: `https://metabase.${DOMAIN}`, + }, generateCORSAllowList(CUSTOM_DOMAINS, DOMAIN), ...generateTeamSecrets(config, env), ],