diff --git a/terraform/application/application.tf b/terraform/application/application.tf index 0b4ea22941..a9f8a84be1 100644 --- a/terraform/application/application.tf +++ b/terraform/application/application.tf @@ -8,7 +8,6 @@ module "application_configuration" { config_short = var.config_short secret_key_vault_short = "app" - # Delete for non rails apps is_rails_application = true config_variables = { @@ -34,4 +33,5 @@ module "web_application" { kubernetes_secret_name = module.application_configuration.kubernetes_secret_name docker_image = var.docker_image + command = var.startup_command } diff --git a/terraform/application/config/review.tfvars.json b/terraform/application/config/review.tfvars.json index ac1f382e51..c6941fb9e9 100644 --- a/terraform/application/config/review.tfvars.json +++ b/terraform/application/config/review.tfvars.json @@ -2,5 +2,6 @@ "cluster": "test", "namespace": "srtl-development", "deploy_azure_backing_services": false, - "enable_postgres_ssl": false + "enable_postgres_ssl": false, + "startup_command": ["/bin/sh", "-c", "bundle exec rake db:schema:load db:seed && bundle exec rails server -b 0.0.0.0"] } diff --git a/terraform/application/variables.tf b/terraform/application/variables.tf index 7b899b3b34..2d7e11cfa9 100644 --- a/terraform/application/variables.tf +++ b/terraform/application/variables.tf @@ -34,6 +34,9 @@ variable "enable_postgres_backup_storage" { variable "docker_image" { description = "Docker image full name to identify it in the registry. Includes docker registry, repository and tag e.g.: ghcr.io/dfe-digital/teacher-pay-calculator:673f6309fd0c907014f44d6732496ecd92a2bcd0" } +variable "startup_command" { + type = list(string) +} variable "external_url" { default = null description = "Healthcheck URL for StatusCake monitoring"