Skip to content
Snippets Groups Projects
Commit e2a2b388 authored by Taha Cherfia's avatar Taha Cherfia
Browse files

fix: listen to port 8089

parent 6dbde64d
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ resource "google_cloud_run_v2_service" "translation_api_service" { ...@@ -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}" image = "${data.terraform_remote_state.holi_infra_state.outputs.artifact_registry_location}/holi-translation-api:${var.image_tag}"
ports { ports {
container_port = 5000 container_port = 8089
} }
env { env {
...@@ -42,19 +42,22 @@ resource "google_cloud_run_v2_service" "translation_api_service" { ...@@ -42,19 +42,22 @@ resource "google_cloud_run_v2_service" "translation_api_service" {
value = local.environment 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 { resources {
limits = { limits = {
cpu = "1" cpu = "1"
memory = "512Mi" memory = local.environment == "production" ? "512Mi" : "256Mi"
} }
} }
} }
scaling { scaling {
min_instance_count = local.environment == "production" ? "1" : "0" 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 { vpc_access {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment