From ce727e7ed5aa2deba8b12845b0b989b43b2fa7d9 Mon Sep 17 00:00:00 2001 From: Jamil Date: Thu, 4 Jan 2024 11:39:47 -0800 Subject: [PATCH] refactor(portal): Use ghcr.io for public pulls of prod images (#3105) Noticed our public pulls are coming from `pkg.dev` for prod, so this PR fixes that so that they're from `ghcr.io` to avoid bandwidth fees and segregate public pulls from our own infra pulls. Screenshot 2024-01-03 at 12 42 51 PM --- terraform/environments/production/main.tf | 5 +++++ terraform/environments/staging/main.tf | 5 +++++ terraform/modules/elixir-app/main.tf | 4 ---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/terraform/environments/production/main.tf b/terraform/environments/production/main.tf index 278463c2d..5923dffb5 100644 --- a/terraform/environments/production/main.tf +++ b/terraform/environments/production/main.tf @@ -494,6 +494,11 @@ locals { name = "AUTH_PROVIDER_ADAPTERS" value = "email,openid_connect,google_workspace,token" }, + # Registry from which Docker install scripts pull from + { + name = "DOCKER_REGISTRY" + value = "ghcr.io/firezone" + }, # Telemetry { name = "TELEMETRY_ENABLED" diff --git a/terraform/environments/staging/main.tf b/terraform/environments/staging/main.tf index 884b51486..b5895eccc 100644 --- a/terraform/environments/staging/main.tf +++ b/terraform/environments/staging/main.tf @@ -445,6 +445,11 @@ locals { name = "AUTH_PROVIDER_ADAPTERS" value = "email,openid_connect,google_workspace,token" }, + # Registry from which Docker install scripts pull from + { + name = "DOCKER_REGISTRY" + value = "${module.google-artifact-registry.url}/${module.google-artifact-registry.repo}" + }, # Telemetry { name = "TELEMETRY_ENABLED" diff --git a/terraform/modules/elixir-app/main.tf b/terraform/modules/elixir-app/main.tf index 27d0d5a61..54672c496 100644 --- a/terraform/modules/elixir-app/main.tf +++ b/terraform/modules/elixir-app/main.tf @@ -39,10 +39,6 @@ locals { name = "PLATFORM_ADAPTER" value = "Elixir.Domain.GoogleCloudPlatform" }, - { - name = "DOCKER_REGISTRY" - value = "${var.container_registry}/${var.image_repo}" - }, { name = "PLATFORM_ADAPTER_CONFIG" value = jsonencode({