✨ Better launchpad
This commit is contained in:
285
launchpad.toml
285
launchpad.toml
@@ -1,61 +1,280 @@
|
||||
# launchpad.toml
|
||||
# This file configures the Launchpad tool for the Turbine project.
|
||||
# It defines all services, their development commands, and their production deployment configuration.
|
||||
|
||||
# An array of services that the launchpad can manage.
|
||||
[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 to the service's source code, relative to the project root.
|
||||
path = "./pkg/gateway"
|
||||
|
||||
# --- Development Configuration ---
|
||||
# Used by the 'launchpad dev' command.
|
||||
[services.dev]
|
||||
# Command to run the service from source.
|
||||
command = "go run ./main.go"
|
||||
|
||||
# --- Production Configuration ---
|
||||
# Used by the 'launchpad prod-gen' command to generate docker-compose.yml.
|
||||
[services.dev.healthcheck]
|
||||
tcp_ports = [8080]
|
||||
[services.prod]
|
||||
dockerfile = "./pkg/gateway/Dockerfile"
|
||||
image = "turbine/gateway:latest"
|
||||
ports = ["8080:8080"]
|
||||
depends_on = ["etcd"]
|
||||
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"
|
||||
depends_on = ["etcd"]
|
||||
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 = "orders-api"
|
||||
type = "dotnet"
|
||||
# IMPORTANT: This path should be updated to point to the actual location of the .NET project.
|
||||
path = "../turbine-dotnet-services/orders-api"
|
||||
|
||||
[services.dev]
|
||||
# Example of running from source:
|
||||
command = "dotnet watch run"
|
||||
# Example of running a pre-built development image (uncomment to use):
|
||||
# image = "my-dev-registry/orders-api:dev-latest"
|
||||
|
||||
name = "queue"
|
||||
type = "docker"
|
||||
[services.dev.healthcheck]
|
||||
tcp_ports = [4222]
|
||||
[services.prod]
|
||||
# Path to the Dockerfile for the .NET service.
|
||||
dockerfile = "../turbine-dotnet-services/orders-api/Dockerfile"
|
||||
image = "turbine/orders-api:latest"
|
||||
depends_on = ["etcd", "config"]
|
||||
# Environment variables to be set in docker-compose.
|
||||
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 = [
|
||||
"ASPNETCORE_ENVIRONMENT=Production",
|
||||
# The URL for the config service, accessible via the docker network.
|
||||
"CONFIG_URL=http://config"
|
||||
"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}",
|
||||
"HTTPS_PORTS=${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.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}",
|
||||
"HTTPS_PORTS=${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" }
|
||||
|
||||
|
||||
[[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}",
|
||||
"HTTPS_PORTS=${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" }
|
||||
|
||||
|
||||
[[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}",
|
||||
"HTTPS_PORTS=${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" }
|
||||
|
||||
|
||||
[[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}",
|
||||
"HTTPS_PORTS=${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" }
|
||||
|
||||
|
||||
[[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}",
|
||||
"HTTPS_PORTS=${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" }
|
||||
|
||||
|
||||
[[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}",
|
||||
"HTTPS_PORTS=${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" }
|
||||
|
||||
Reference in New Issue
Block a user