Skip to content

Commit 481297c

Browse files
committed
DTOSS-11646: Setup Container Apps container probes
We need to configure a container probe (liveness/readiness) for our Azure Container Apps deployment. By default, the web application should only have a heath probe if the variable probe_path is set. If probe_path is null then it's disabled. Please note that we cannot do this for the Postgres DB container as there is no Django / restful interface to implement.
1 parent 53fc401 commit 481297c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

infrastructure/environments/review/variables.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ AZURE_SUBSCRIPTION="Breast Screening - Manage Breast Screening - Dev"
33
HUB_SUBSCRIPTION="Digital Screening DToS - DevOps"
44
HUB=dev
55
TERRAFORM_MODULES_REF=main
6+
RUN_NOTIFICATIONS_SMOKE_TEST=false
67
ENABLE_SOFT_DELETE=false
78
ADO_MANAGEMENT_POOL=private-pool-dev-uks
8-
RUN_NOTIFICATIONS_SMOKE_TEST=false

infrastructure/modules/container-apps/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module "webapp" {
3838
environment_variables = merge(
3939
local.common_env,
4040
{
41-
ALLOWED_HOSTS = "${var.app_short_name}-web-${var.environment}.${var.default_domain}"
41+
ALLOWED_HOSTS = "${var.app_short_name}-web-${var.environment}.${var.default_domain},localhost,127.0.0.1"
4242
},
4343
var.deploy_database_as_container ? local.container_db_env : local.azure_db_env
4444
)
@@ -48,6 +48,8 @@ module "webapp" {
4848
)
4949
is_web_app = true
5050
port = 8000
51+
probe_path = "/healthcheck"
52+
5153
}
5254

5355
module "azurerm_application_insights_standard_web_test" {

0 commit comments

Comments
 (0)