diff --git a/terraform/config.template.yaml b/terraform/config.template.yaml deleted file mode 100644 index f4d4303a..00000000 --- a/terraform/config.template.yaml +++ /dev/null @@ -1,3 +0,0 @@ -GQL_API_URL: ${gql_api_url} -WEBSITE_URL: ${website_url} -WEBSITE_BIND: "0.0.0.0:3000" diff --git a/terraform/deployment.tf b/terraform/deployment.tf index 36be6370..0a91bd9e 100644 --- a/terraform/deployment.tf +++ b/terraform/deployment.tf @@ -11,10 +11,9 @@ resource "kubernetes_secret" "app" { } data = { - "config.yaml" = templatefile("${path.module}/config.template.yaml", { - website_url = "https://${local.infra.primary_zone}" - gql_api_url = "https://${local.infra.secondary_zone}/v3/gql" - }) + WEBSITE_URL = "https://${local.infra.primary_zone}" + GQL_API_URL = "http://api:3000/v3/gql" + WEBSITE_BIND : "0.0.0.0:3000" } } @@ -62,12 +61,6 @@ resource "kubernetes_deployment" "app" { protocol = "TCP" } - env_from { - secret_ref { - name = kubernetes_secret.app.metadata[0].name - } - } - resources { requests = { cpu = "10m" @@ -79,6 +72,12 @@ resource "kubernetes_deployment" "app" { } } + env_from { + secret_ref { + name = kubernetes_secret.app.metadata[0].name + } + } + liveness_probe { http_get { port = "http"