From 190b1c7f6d8062538b199a8c8e90d788b2edb070 Mon Sep 17 00:00:00 2001 From: vipin-dfe Date: Thu, 14 Nov 2024 15:43:53 +0000 Subject: [PATCH] Update with review comments --- config/database.yml | 4 ---- script/docker-entrypoint.sh | 2 +- terraform/aks/database.tf | 30 +++++++++++++++--------------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/config/database.yml b/config/database.yml index 579ddea27..43b1345bc 100644 --- a/config/database.yml +++ b/config/database.yml @@ -101,10 +101,6 @@ test: &test # production: &production <<: *default - # host: <%= ENV['DB_HOST'] %> - # database: <%= ENV['DB_DATABASE'] %> - # username: <%= ENV['DB_USERNAME'] %> - # password: <%= ENV['DB_PASSWORD'] %> keepalives: 1 keepalives_idle: 60 keepalives_interval: 20 diff --git a/script/docker-entrypoint.sh b/script/docker-entrypoint.sh index 0be488860..401dd48f4 100755 --- a/script/docker-entrypoint.sh +++ b/script/docker-entrypoint.sh @@ -16,7 +16,7 @@ while [[ $# -gt 0 ]]; do ;; -e|prepare) echo Preparing database - bundle exec rails db:prepare && bundle exec rails data:schools:sample_import + bundle exec rails db:prepare shift ;; -p|profile) diff --git a/terraform/aks/database.tf b/terraform/aks/database.tf index 396372a68..e582792ae 100644 --- a/terraform/aks/database.tf +++ b/terraform/aks/database.tf @@ -2,23 +2,23 @@ module "postgres" { count = 1 source = "./vendor/modules/aks//aks/postgres" - namespace = var.namespace - environment = var.environment - azure_resource_prefix = var.azure_resource_prefix - service_name = var.service_name - service_short = var.service_short - config_short = var.config_short - cluster_configuration_map = module.cluster_data.configuration_map - use_azure = var.deploy_azure_backing_services - azure_enable_monitoring = var.enable_monitoring - server_version = "14" - azure_sku_name = var.postgres_flexible_server_sku - azure_enable_backup_storage = var.azure_enable_backup_storage - azure_extensions = ["POSTGIS", "address_standardizer", "plpgsql", "postgis_raster", "uuid-ossp", "citext"] + namespace = var.namespace + environment = var.environment + azure_resource_prefix = var.azure_resource_prefix + service_name = var.service_name + service_short = var.service_short + config_short = var.config_short + cluster_configuration_map = module.cluster_data.configuration_map + use_azure = var.deploy_azure_backing_services + azure_enable_monitoring = var.enable_monitoring + server_version = "14" + azure_sku_name = var.postgres_flexible_server_sku + azure_enable_backup_storage = var.azure_enable_backup_storage + azure_extensions = ["POSTGIS", "address_standardizer", "plpgsql", "postgis_raster", "uuid-ossp", "citext"] azure_enable_high_availability = var.postgres_enable_high_availability azure_maintenance_window = var.azure_maintenance_window - server_docker_image = "postgis/postgis:14-3.4" - create_database = var.create_database + server_docker_image = "postgis/postgis:14-3.4" + create_database = var.create_database } module "redis-cache" {