Skip to content

Commit 3cf0e0b

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 3cf0e0b

File tree

1 file changed

+3
-1
lines changed
  • infrastructure/modules/container-apps

1 file changed

+3
-1
lines changed

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)