Skip to content

Commit

Permalink
Add startup command
Browse files Browse the repository at this point in the history
  • Loading branch information
vipin-dfe committed Nov 10, 2024
1 parent 3a2f0ef commit 9502eab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terraform/aks/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion terraform/aks/config/review.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
4 changes: 4 additions & 0 deletions terraform/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9502eab

Please sign in to comment.