diff --git a/terraform/aks/application.tf b/terraform/aks/application.tf index 3e7e23531..876ee97c2 100644 --- a/terraform/aks/application.tf +++ b/terraform/aks/application.tf @@ -43,7 +43,7 @@ module "web_application" { kubernetes_secret_name = module.application_configuration.kubernetes_secret_name docker_image = var.docker_image - command = ["/app/docker-entrypoint.sh", "-m", "-f"] + command = var.webapp_startup_command probe_path = "/check" web_external_hostnames = var.create_dsi_ingress ? [var.dsi_hostname] : [] enable_logit = var.enable_logit diff --git a/terraform/aks/config/review.tfvars.json b/terraform/aks/config/review.tfvars.json index 9fe898521..1f47326fd 100644 --- a/terraform/aks/config/review.tfvars.json +++ b/terraform/aks/config/review.tfvars.json @@ -18,5 +18,10 @@ "sidekiq_memory_max" : "1Gi", "create_dsi_ingress": true, "enable_logit": true, - "enable_dfe_analytics_federated_auth": true + "enable_dfe_analytics_federated_auth": true, + "webapp_startup_command": [ + "/bin/sh", + "-c", + "bundle exec rails db:schema_load_or_migrate && bundle exec rails data:schools:sample_import && bundle exec rails runner \"%i(eligibility_screener referral_form).each {|flag| FeatureFlags::FeatureFlag.activate(flag)}\" && bundle exec rails server -b 0.0.0.0" + ] } diff --git a/terraform/aks/variables.tf b/terraform/aks/variables.tf index 80b29cbd7..29059de5b 100644 --- a/terraform/aks/variables.tf +++ b/terraform/aks/variables.tf @@ -171,6 +171,10 @@ variable "enable_prometheus_monitoring" { type = bool default = false } +variable "webapp_startup_command" { + description = "Override Dockerfile startup command" + default = ["/app/docker-entrypoint.sh", "-m", "-f"] +} locals { azure_credentials = try(jsondecode(var.azure_credentials_json), null)