288 lines
7.3 KiB
Text
288 lines
7.3 KiB
Text
# Docker Compose Platform Stack - MultiUser Mode
|
|
# Full platform with PostgreSQL, Gitea, and monitoring
|
|
# For team collaboration and staging environments
|
|
|
|
{
|
|
services = {
|
|
postgres = {
|
|
image = "postgres:15-alpine",
|
|
container_name = "postgres",
|
|
environment = {
|
|
POSTGRES_DB = "provisioning",
|
|
POSTGRES_USER = "provisioning",
|
|
POSTGRES_PASSWORD = "provisioning_dev",
|
|
},
|
|
volumes = [
|
|
"postgres_data:/var/lib/postgresql/data",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
healthcheck = {
|
|
test = ["CMD-SHELL", "pg_isready -U provisioning"],
|
|
interval = "10s",
|
|
timeout = "5s",
|
|
retries = 5,
|
|
},
|
|
},
|
|
|
|
orchestrator = {
|
|
build = {
|
|
context = ".",
|
|
dockerfile = "crates/orchestrator/Dockerfile",
|
|
},
|
|
container_name = "orchestrator",
|
|
ports = [
|
|
"8080:8080",
|
|
],
|
|
environment = {
|
|
ORCHESTRATOR_MODE = "multiuser",
|
|
ORCHESTRATOR_SERVER_HOST = "0.0.0.0",
|
|
ORCHESTRATOR_SERVER_PORT = "8080",
|
|
ORCHESTRATOR_STORAGE_BACKEND = "surrealdb_server",
|
|
ORCHESTRATOR_SURREALDB_URL = "surrealdb://surrealdb:8000",
|
|
ORCHESTRATOR_SURREALDB_NAMESPACE = "provisioning",
|
|
ORCHESTRATOR_SURREALDB_DATABASE = "orchestrator",
|
|
RUST_LOG = "debug",
|
|
},
|
|
volumes = [
|
|
"orchestrator_data:/data",
|
|
"orchestrator_logs:/var/log/orchestrator",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
depends_on = {
|
|
surrealdb = {
|
|
condition = "service_healthy",
|
|
},
|
|
},
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:8080/health"],
|
|
interval = "30s",
|
|
timeout = "10s",
|
|
retries = 3,
|
|
start_period = "40s",
|
|
},
|
|
},
|
|
|
|
control-center = {
|
|
build = {
|
|
context = ".",
|
|
dockerfile = "crates/control-center/Dockerfile",
|
|
},
|
|
container_name = "control-center",
|
|
ports = [
|
|
"8081:8081",
|
|
],
|
|
environment = {
|
|
CONTROL_CENTER_MODE = "multiuser",
|
|
CONTROL_CENTER_SERVER_HOST = "0.0.0.0",
|
|
CONTROL_CENTER_SERVER_PORT = "8081",
|
|
CONTROL_CENTER_DATABASE = "postgres",
|
|
CONTROL_CENTER_DATABASE_URL = "postgresql://provisioning:provisioning_dev@postgres/provisioning",
|
|
ORCHESTRATOR_URL = "http://orchestrator:8080",
|
|
RUST_LOG = "debug",
|
|
CONTROL_CENTER_MFA_REQUIRED = "false",
|
|
},
|
|
volumes = [
|
|
"control_center_data:/data",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
depends_on = {
|
|
postgres = {
|
|
condition = "service_healthy",
|
|
},
|
|
orchestrator = {
|
|
condition = "service_healthy",
|
|
},
|
|
},
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:8081/health"],
|
|
interval = "30s",
|
|
timeout = "10s",
|
|
retries = 3,
|
|
start_period = "40s",
|
|
},
|
|
},
|
|
|
|
mcp-server = {
|
|
build = {
|
|
context = ".",
|
|
dockerfile = "crates/mcp-server/Dockerfile",
|
|
},
|
|
container_name = "mcp-server",
|
|
ports = [
|
|
"8082:8082",
|
|
],
|
|
environment = {
|
|
MCP_SERVER_MODE = "multiuser",
|
|
MCP_SERVER_HOST = "0.0.0.0",
|
|
MCP_SERVER_PORT = "8082",
|
|
MCP_SERVER_PROTOCOL = "stdio",
|
|
ORCHESTRATOR_URL = "http://orchestrator:8080",
|
|
RUST_LOG = "debug",
|
|
},
|
|
volumes = [
|
|
"mcp_server_data:/data",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
depends_on = {
|
|
orchestrator = {
|
|
condition = "service_healthy",
|
|
},
|
|
control-center = {
|
|
condition = "service_healthy",
|
|
},
|
|
},
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:8082/health"],
|
|
interval = "30s",
|
|
timeout = "10s",
|
|
retries = 3,
|
|
start_period = "40s",
|
|
},
|
|
},
|
|
|
|
provisioning-daemon = {
|
|
build = {
|
|
context = ".",
|
|
dockerfile = "crates/provisioning-daemon/Dockerfile",
|
|
},
|
|
container_name = "provisioning-daemon",
|
|
ports = [
|
|
"8079:8079",
|
|
],
|
|
environment = {
|
|
RUST_LOG = "debug",
|
|
DATA_DIR = "/data",
|
|
PROVISIONING_DAEMON_MODE = "multiuser",
|
|
PROVISIONING_CONFIG_DIR = "/etc/provisioning",
|
|
},
|
|
volumes = [
|
|
"daemon_data:/data",
|
|
"daemon_config:/etc/provisioning",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
depends_on = {
|
|
orchestrator = {
|
|
condition = "service_healthy",
|
|
},
|
|
postgres = {
|
|
condition = "service_healthy",
|
|
},
|
|
},
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:8079/api/v1/health"],
|
|
interval = "30s",
|
|
timeout = "10s",
|
|
retries = 3,
|
|
start_period = "30s",
|
|
},
|
|
},
|
|
|
|
provisioning-rag = {
|
|
build = {
|
|
context = ".",
|
|
dockerfile = "crates/rag/docker/Dockerfile",
|
|
},
|
|
container_name = "provisioning-rag",
|
|
ports = [
|
|
"9090:9090",
|
|
],
|
|
environment = {
|
|
PROVISIONING_LOG_LEVEL = "debug",
|
|
PROVISIONING_API_HOST = "0.0.0.0",
|
|
PROVISIONING_API_PORT = "9090",
|
|
PROVISIONING_CACHE_SIZE = "2000",
|
|
PROVISIONING_CACHE_TTL_SECS = "5400",
|
|
},
|
|
volumes = [
|
|
"rag_data:/app/data",
|
|
"rag_cache:/app/cache",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
depends_on = {
|
|
orchestrator = {
|
|
condition = "service_healthy",
|
|
},
|
|
},
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:9090/health"],
|
|
interval = "30s",
|
|
timeout = "10s",
|
|
retries = 3,
|
|
start_period = "5s",
|
|
},
|
|
},
|
|
|
|
surrealdb = {
|
|
image = "surrealdb/surrealdb:latest",
|
|
container_name = "surrealdb",
|
|
command = "start --log=info",
|
|
ports = [
|
|
"8000:8000",
|
|
],
|
|
volumes = [
|
|
"surrealdb_data:/var/lib/surrealdb",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:8000/health"],
|
|
interval = "10s",
|
|
timeout = "5s",
|
|
retries = 5,
|
|
},
|
|
},
|
|
|
|
gitea = {
|
|
image = "gitea/gitea:latest",
|
|
container_name = "gitea",
|
|
ports = [
|
|
"3000:3000",
|
|
"2222:22",
|
|
],
|
|
environment = {
|
|
GITEA_APP_NAME = "Provisioning Gitea",
|
|
GITEA_RUN_MODE = "prod",
|
|
GITEA_SSH_PORT = "2222",
|
|
},
|
|
volumes = [
|
|
"gitea_data:/data",
|
|
],
|
|
networks = ["provisioning"],
|
|
restart = "unless-stopped",
|
|
depends_on = ["postgres"],
|
|
healthcheck = {
|
|
test = ["CMD", "curl", "-f", "http://localhost:3000"],
|
|
interval = "30s",
|
|
timeout = "10s",
|
|
retries = 3,
|
|
start_period = "40s",
|
|
},
|
|
},
|
|
},
|
|
|
|
volumes = {
|
|
postgres_data = null,
|
|
orchestrator_data = null,
|
|
orchestrator_logs = null,
|
|
control_center_data = null,
|
|
mcp_server_data = null,
|
|
daemon_data = null,
|
|
daemon_config = null,
|
|
rag_data = null,
|
|
rag_cache = null,
|
|
surrealdb_data = null,
|
|
gitea_data = null,
|
|
},
|
|
|
|
networks = {
|
|
provisioning = {
|
|
driver = "bridge",
|
|
},
|
|
},
|
|
}
|