Skip to content

Commit

Permalink
Add startup command
Browse files Browse the repository at this point in the history
  • Loading branch information
AbigailMcP committed May 13, 2024
1 parent a5ae696 commit 948e04d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terraform/application/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
}
3 changes: 2 additions & 1 deletion terraform/application/config/review.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
3 changes: 3 additions & 0 deletions terraform/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 948e04d

Please sign in to comment.