From e2a2b3884177a3de9328021d2620cec199ea8f11 Mon Sep 17 00:00:00 2001 From: Taha Cherfia <taha.cherfia@holi.team> Date: Wed, 17 Jul 2024 12:04:38 +0200 Subject: [PATCH] fix: listen to port 8089 --- terraform/environments/deployment.tf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/terraform/environments/deployment.tf b/terraform/environments/deployment.tf index 68faf1a..eef3fa8 100644 --- a/terraform/environments/deployment.tf +++ b/terraform/environments/deployment.tf @@ -34,7 +34,7 @@ resource "google_cloud_run_v2_service" "translation_api_service" { image = "${data.terraform_remote_state.holi_infra_state.outputs.artifact_registry_location}/holi-translation-api:${var.image_tag}" ports { - container_port = 5000 + container_port = 8089 } env { @@ -42,19 +42,22 @@ resource "google_cloud_run_v2_service" "translation_api_service" { value = local.environment } - args = ["--host", "0.0.0.0"] + env { + name = "HOLI_LIBRETRANSLATE_BASE_URL" + value = local.environment == "production" ? "https://staging.libretranslate.apis.holi.social" : "https://production.libretranslate.apis.holi.social" + } resources { limits = { cpu = "1" - memory = "512Mi" + memory = local.environment == "production" ? "512Mi" : "256Mi" } } } scaling { min_instance_count = local.environment == "production" ? "1" : "0" - max_instance_count = local.environment == "production" ? "10" : "3" + max_instance_count = local.environment == "production" ? "10" : "1" } vpc_access { -- GitLab