43 lines
1.2 KiB
Terraform
43 lines
1.2 KiB
Terraform
# =============================================================================
|
|
# Node.js Dashboard — читает Redis, показывает графики Chart.js
|
|
# =============================================================================
|
|
locals {
|
|
dashboard_redis_host = try(nubes_redis.main.state_out_flat["internalConnect.master"], "")
|
|
dashboard_redis_password = try(nonsensitive(nubes_redis.main.vault_secrets["adminPass"]), "")
|
|
}
|
|
|
|
resource "nubes_nodejs" "dashboard" {
|
|
resource_name = local.dashboard_resource_name
|
|
|
|
startup_configuration = {
|
|
resource_realm = var.realm
|
|
}
|
|
|
|
cluster_configuration = {
|
|
cpu = local.dashboard_cpu
|
|
memory = local.dashboard_memory
|
|
replicas = local.dashboard_replicas
|
|
}
|
|
|
|
access_configuration = {
|
|
domain = local.dashboard_domain
|
|
}
|
|
|
|
app_configuration = {
|
|
version = "22"
|
|
git_path = local.dashboard_git_path
|
|
health_path = "/"
|
|
}
|
|
|
|
git_revision = local.dashboard_git_revision
|
|
operation_timeout = local.dashboard_timeout
|
|
|
|
json_env = jsonencode({
|
|
REDIS_HOST = local.dashboard_redis_host
|
|
REDIS_PORT = "6379"
|
|
REDIS_PASSWORD = local.dashboard_redis_password
|
|
})
|
|
|
|
depends_on = [nubes_redis.main]
|
|
}
|