286 lines
7.1 KiB
TOML
286 lines
7.1 KiB
TOML
# This file configures the Launchpad tool for the Turbine project.
|
|
# It defines all services, their development commands, and their production deployment configuration.
|
|
|
|
[variables]
|
|
required = [
|
|
"GATEWAY_IMAGE",
|
|
"CACHE_IMAGE",
|
|
"QUEUE_IMAGE",
|
|
"RING_IMAGE",
|
|
"PASS_IMAGE",
|
|
"DRIVE_IMAGE",
|
|
"SPHERE_IMAGE",
|
|
"DEVELOP_IMAGE",
|
|
"INSIGHT_IMAGE",
|
|
"ZONE_IMAGE",
|
|
"RING_PORT",
|
|
"PASS_PORT",
|
|
"DRIVE_PORT",
|
|
"SPHERE_PORT",
|
|
"DEVELOP_PORT",
|
|
"INSIGHT_PORT",
|
|
"ZONE_PORT",
|
|
"RING_ALTPORT",
|
|
"PASS_ALTPORT",
|
|
"DRIVE_ALTPORT",
|
|
"SPHERE_ALTPORT",
|
|
"DEVELOP_ALTPORT",
|
|
"INSIGHT_ALTPORT",
|
|
"ZONE_ALTPORT",
|
|
]
|
|
|
|
[networks]
|
|
solar-network = {}
|
|
|
|
# -------------------------------------------------
|
|
# Service Definitions
|
|
# -------------------------------------------------
|
|
|
|
# --- Go Services ---
|
|
[[services]]
|
|
name = "gateway"
|
|
type = "go"
|
|
path = "./pkg/gateway"
|
|
[services.dev]
|
|
command = "go run ./main.go"
|
|
[services.dev.healthcheck]
|
|
tcp_ports = [8080]
|
|
[services.prod]
|
|
dockerfile = "./pkg/gateway/Dockerfile"
|
|
image = "turbine/gateway:latest"
|
|
ports = ["8080:8080"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
etcd = { condition = "service_healthy" }
|
|
config = { condition = "service_started" }
|
|
|
|
|
|
[[services]]
|
|
name = "config"
|
|
type = "go"
|
|
path = "./pkg/config"
|
|
[services.dev]
|
|
command = "go run ./main.go"
|
|
[services.dev.healthcheck]
|
|
tcp_ports = [8081]
|
|
[services.prod]
|
|
dockerfile = "./pkg/config/Dockerfile"
|
|
image = "turbine/config:latest"
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
etcd = { condition = "service_healthy" }
|
|
|
|
|
|
# --- Third-Party Services ---
|
|
[[services]]
|
|
name = "cache"
|
|
type = "docker"
|
|
[services.dev.healthcheck]
|
|
tcp_ports = [6379]
|
|
[services.prod]
|
|
image = "valkey/valkey" # Valkey
|
|
expose = ["6379"]
|
|
networks = ["solar-network"]
|
|
[services.prod.healthcheck]
|
|
test = ["CMD", "valkey-cli", "ping"]
|
|
interval = "10s"
|
|
timeout = "5s"
|
|
retries = 5
|
|
|
|
|
|
[[services]]
|
|
name = "queue"
|
|
type = "docker"
|
|
[services.dev.healthcheck]
|
|
tcp_ports = [4222]
|
|
[services.prod]
|
|
image = "nats" # NATS
|
|
command = ["-js"]
|
|
expose = ["4222"]
|
|
networks = ["solar-network"]
|
|
[services.prod.healthcheck]
|
|
test = ["CMD", "nats", "healthz"]
|
|
interval = "10s"
|
|
timeout = "5s"
|
|
retries = 5
|
|
|
|
|
|
[[services]]
|
|
name = "etcd"
|
|
type = "docker"
|
|
[services.dev.healthcheck]
|
|
tcp_ports = [2379]
|
|
[services.prod]
|
|
image = "bitnami/etcd"
|
|
environment = [
|
|
"ALLOW_NONE_AUTHENTICATION=yes",
|
|
"ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379",
|
|
]
|
|
ports = ["2379:2379"]
|
|
networks = ["solar-network"]
|
|
[services.prod.healthcheck]
|
|
test = ["CMD", "etcdctl", "endpoint", "health"]
|
|
interval = "10s"
|
|
timeout = "5s"
|
|
retries = 5
|
|
|
|
|
|
# --- .NET Services (omitting the rest for brevity in this example) ---
|
|
[[services]]
|
|
name = "ring"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Ring"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${RING_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${RING_PORT}",
|
|
"GRPC_PORT=${RING_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=ring",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/ring.json:/app/appsettings.json"]
|
|
expose = ["${RING_PORT}", "${RING_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.healthcheck]
|
|
test = ["CMD", "curl", "-f", "http://localhost:${RING_PORT}/health"]
|
|
interval = "10s"
|
|
timeout = "5s"
|
|
retries = 5
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
|
|
[[services]]
|
|
name = "pass"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Pass"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${PASS_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${PASS_PORT}",
|
|
"GRPC_PORT=${PASS_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=pass",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/pass.json:/app/appsettings.json"]
|
|
expose = ["${PASS_PORT}", "${PASS_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
ring = { condition = "service_healthy" }
|
|
|
|
[[services]]
|
|
name = "sphere"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Sphere"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${SPHERE_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${SPHERE_PORT}",
|
|
"GRPC_PORT=${SPHERE_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=sphere",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/sphere.json:/app/appsettings.json"]
|
|
expose = ["${SPHERE_PORT}", "${SPHERE_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
ring = { condition = "service_healthy" }
|
|
|
|
[[services]]
|
|
name = "drive"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Drive"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${DRIVE_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${DRIVE_PORT}",
|
|
"GRPC_PORT=${DRIVE_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=drive",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/drive.json:/app/appsettings.json"]
|
|
expose = ["${DRIVE_PORT}", "${DRIVE_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
ring = { condition = "service_healthy" }
|
|
|
|
[[services]]
|
|
name = "develop"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Develop"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${DEVELOP_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${DEVELOP_PORT}",
|
|
"GRPC_PORT=${DEVELOP_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=develop",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/develop.json:/app/appsettings.json"]
|
|
expose = ["${DEVELOP_PORT}", "${DEVELOP_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
ring = { condition = "service_healthy" }
|
|
|
|
[[services]]
|
|
name = "insight"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Insight"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${INSIGHT_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${INSIGHT_PORT}",
|
|
"GRPC_PORT=${INSIGHT_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=insight",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/insight.json:/app/appsettings.json"]
|
|
expose = ["${INSIGHT_PORT}", "${INSIGHT_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
ring = { condition = "service_healthy" }
|
|
|
|
[[services]]
|
|
name = "zone"
|
|
type = "dotnet"
|
|
path = "../DysonNetwork/DysonNetwork.Zone"
|
|
[services.dev]
|
|
command = "dotnet watch run"
|
|
[services.prod]
|
|
image = "${ZONE_IMAGE}"
|
|
environment = [
|
|
"ASPNETCORE_FORWARDEDHEADERS_ENABLED=true",
|
|
"HTTP_PORTS=${ZONE_PORT}",
|
|
"GRPC_PORT=${ZONE_ALTPORT}",
|
|
"OTEL_SERVICE_NAME=zone",
|
|
]
|
|
volumes = ["./keys:/app/keys", "./settings/zone.json:/app/appsettings.json"]
|
|
expose = ["${ZONE_PORT}", "${ZONE_ALTPORT}"]
|
|
networks = ["solar-network"]
|
|
[services.prod.depends_on]
|
|
cache = { condition = "service_healthy" }
|
|
queue = { condition = "service_healthy" }
|
|
ring = { condition = "service_healthy" }
|