feat: IoT demo final — 6 services (Kafka+Redis+MongoDB+2Flask+NodeJS), removed broken CH/Superset/AKHQ
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# =============================================================================
|
||||
# Node.js Dashboard — читает Redis, показывает графики Chart.js
|
||||
# =============================================================================
|
||||
locals {
|
||||
dashboard_redis_host = try(nubes_redis.main.state_out_flat["internalConnect.master"], "")
|
||||
dashboard_redis_secrets = try(jsondecode(nubes_redis.main.vault_secrets["users"]), tomap({}))
|
||||
dashboard_redis_password = try(nonsensitive(lookup(local.dashboard_redis_secrets, "default", tomap({})).password), "")
|
||||
}
|
||||
|
||||
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]
|
||||
}
|
||||
Reference in New Issue
Block a user