Skip to content

Commit

Permalink
[#IOPID-2284] enable PM2 startup for session-manager (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcogabbo authored Oct 3, 2024
1 parent 4604e86 commit e3f5455
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/domains/citizen-auth-app/08_session_manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ locals {

# Fast Login config
FF_FAST_LOGIN = "ALL"
LV_TEST_USERS = module.tests.test_users.all
# TODO: change this variable to a list of regex to reduce characters and fix
# E2BIG errors on linux spawn syscall when using PM2
LV_TEST_USERS = module.tests.test_users.light

# IOLOGIN redirect
FF_IOLOGIN = "BETA"
Expand All @@ -158,7 +160,9 @@ locals {
IOLOGIN_CANARY_USERS_REGEX = "^([(0-9)|(a-f)|(A-F)]{63}0)$"

# Test Login config
TEST_LOGIN_FISCAL_CODES = module.tests.test_users.all
# TODO: change this variable to a list of regex to reduce characters and fix
# E2BIG errors on linux spawn syscall when using PM2
TEST_LOGIN_FISCAL_CODES = module.tests.test_users.light
TEST_LOGIN_PASSWORD = data.azurerm_key_vault_secret.session_manager_TEST_LOGIN_PASSWORD.value


Expand Down Expand Up @@ -322,9 +326,13 @@ module "session_manager_weu_staging" {
resource_group_name = azurerm_resource_group.session_manager_rg_weu.name
location = var.location

always_on = true
node_version = "20-lts"
app_command_line = ""
always_on = true
node_version = "20-lts"
# NOTE:
# 1. index.js file is generated from the deploy pipeline
# 2. the linux container for app services already has pm2 installed
# (refer to https://learn.microsoft.com/en-us/azure/app-service/configure-language-nodejs?pivots=platform-linux#run-with-pm2)
app_command_line = "pm2 start index.js -i max --no-daemon"
health_check_path = "/healthcheck"

auto_heal_enabled = true
Expand Down Expand Up @@ -368,9 +376,13 @@ module "session_manager_weu_staging_04" {
resource_group_name = azurerm_resource_group.session_manager_rg_weu.name
location = var.location

always_on = true
node_version = "20-lts"
app_command_line = ""
always_on = true
node_version = "20-lts"
# NOTE:
# 1. index.js file is generated from the deploy pipeline
# 2. the linux container for app services already has pm2 installed
# (refer to https://learn.microsoft.com/en-us/azure/app-service/configure-language-nodejs?pivots=platform-linux#run-with-pm2)
app_command_line = "pm2 start index.js -i max --no-daemon"
health_check_path = "/healthcheck"

auto_heal_enabled = true
Expand Down

0 comments on commit e3f5455

Please sign in to comment.