250 lines
6.8 KiB
HCL
250 lines
6.8 KiB
HCL
# =============================================================================
|
|
# Coder Applications - Service Access Points
|
|
# Web interfaces and tools for development services
|
|
# =============================================================================
|
|
|
|
# =============================================================================
|
|
# IDE and Code Editor Access
|
|
# =============================================================================
|
|
|
|
# VS Code Server
|
|
resource "coder_app" "code_server" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "code-server"
|
|
display_name = "VS Code"
|
|
url = "http://localhost:8080"
|
|
icon = "/icon/code.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:8080/healthz"
|
|
interval = 10
|
|
threshold = 5
|
|
}
|
|
}
|
|
|
|
# Terminal Access
|
|
resource "coder_app" "terminal" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "terminal"
|
|
display_name = "Terminal"
|
|
icon = "/icon/terminal.svg"
|
|
command = "bash"
|
|
}
|
|
|
|
# =============================================================================
|
|
# Database Management Interfaces
|
|
# =============================================================================
|
|
|
|
# pgAdmin - PostgreSQL Administration
|
|
resource "coder_app" "pgadmin" {
|
|
count = data.coder_parameter.enable_services.value && var.enable_pgadmin ? 1 : 0
|
|
agent_id = coder_agent.main.id
|
|
slug = "pgadmin"
|
|
display_name = "pgAdmin"
|
|
url = "http://localhost:${var.pgadmin_port}"
|
|
icon = "/icon/postgresql.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:${var.pgadmin_port}/misc/ping"
|
|
interval = 15
|
|
threshold = 5
|
|
}
|
|
}
|
|
|
|
# Qdrant Dashboard - Vector Database Management
|
|
resource "coder_app" "qdrant" {
|
|
count = data.coder_parameter.enable_services.value ? 1 : 0
|
|
agent_id = coder_agent.main.id
|
|
slug = "qdrant-dashboard"
|
|
display_name = "Qdrant Dashboard"
|
|
url = "http://localhost:6333/dashboard"
|
|
icon = "/icon/database.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:6333/health"
|
|
interval = 20
|
|
threshold = 5
|
|
}
|
|
}
|
|
|
|
|
|
# =============================================================================
|
|
# Development Server Ports
|
|
# =============================================================================
|
|
|
|
# Next.js Development Server (default port 3000)
|
|
resource "coder_app" "nextjs_dev" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "nextjs-3000"
|
|
display_name = "Next.js Dev Server"
|
|
url = "http://localhost:3000"
|
|
icon = "/icon/nextjs.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:3000"
|
|
interval = 10
|
|
threshold = 10
|
|
}
|
|
}
|
|
|
|
# Generic Development Server (port 3000)
|
|
resource "coder_app" "dev_server_3000" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "dev-3000"
|
|
display_name = "Dev Server (3000)"
|
|
url = "http://localhost:3000"
|
|
icon = "/icon/web.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:3000"
|
|
interval = 10
|
|
threshold = 10
|
|
}
|
|
}
|
|
|
|
# API Server - FastAPI/Flask (port 8000)
|
|
resource "coder_app" "api_server_8000" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "api-8000"
|
|
display_name = "API Server (8000)"
|
|
url = "http://localhost:8000"
|
|
icon = "/icon/api.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:8000/health"
|
|
interval = 10
|
|
threshold = 10
|
|
}
|
|
}
|
|
|
|
# Vite Development Server (port 5173)
|
|
resource "coder_app" "vite_dev" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "vite-5173"
|
|
display_name = "Vite Dev Server"
|
|
url = "http://localhost:5173"
|
|
icon = "/icon/web.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:5173"
|
|
interval = 10
|
|
threshold = 10
|
|
}
|
|
}
|
|
|
|
# Rust Development Server (port 8080)
|
|
resource "coder_app" "rust_server" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "rust-8080"
|
|
display_name = "Rust Server (8080)"
|
|
url = "http://localhost:8080"
|
|
icon = "/icon/rust.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:8080/health"
|
|
interval = 10
|
|
threshold = 10
|
|
}
|
|
}
|
|
|
|
# =============================================================================
|
|
# Data Science and Analytics Tools
|
|
# =============================================================================
|
|
|
|
# Jupyter Lab (if enabled)
|
|
resource "coder_app" "jupyter" {
|
|
count = var.enable_jupyter ? 1 : 0
|
|
agent_id = coder_agent.main.id
|
|
slug = "jupyter"
|
|
display_name = "Jupyter Lab"
|
|
url = "http://localhost:8888"
|
|
icon = "/icon/jupyter.svg"
|
|
subdomain = true
|
|
share = "owner"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:8888"
|
|
interval = 15
|
|
threshold = 10
|
|
}
|
|
}
|
|
|
|
# =============================================================================
|
|
# Utility and Management Applications
|
|
# =============================================================================
|
|
|
|
# Environment Information
|
|
resource "coder_app" "env_info" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "env-info"
|
|
display_name = "Environment Info"
|
|
icon = "/icon/info.svg"
|
|
command = "devinfo"
|
|
}
|
|
|
|
# Database Connection Tester
|
|
resource "coder_app" "db_tester" {
|
|
count = data.coder_parameter.enable_services.value ? 1 : 0
|
|
agent_id = coder_agent.main.id
|
|
slug = "db-tester"
|
|
display_name = "Database Tester"
|
|
icon = "/icon/terminal.svg"
|
|
command = "bash"
|
|
}
|
|
|
|
# Development Logs Viewer
|
|
resource "coder_app" "dev_logs" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "dev-logs"
|
|
display_name = "Development Logs"
|
|
icon = "/icon/terminal.svg"
|
|
command = "bash"
|
|
}
|
|
|
|
# Git Repository Manager
|
|
resource "coder_app" "git_manager" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "git"
|
|
display_name = "Git Repository"
|
|
icon = "/icon/git.svg"
|
|
command = "bash"
|
|
}
|
|
|
|
# =============================================================================
|
|
# AI Development Tools Access
|
|
# =============================================================================
|
|
|
|
# Claude Code CLI Access
|
|
resource "coder_app" "claude_code" {
|
|
count = data.coder_parameter.enable_ai_tools.value && var.install_claude_code ? 1 : 0
|
|
agent_id = coder_agent.main.id
|
|
slug = "claude-code"
|
|
display_name = "Claude Code"
|
|
icon = "/icon/claude.svg"
|
|
command = "claude"
|
|
}
|
|
|
|
# File Manager
|
|
resource "coder_app" "file_manager" {
|
|
agent_id = coder_agent.main.id
|
|
slug = "files"
|
|
display_name = "File Manager"
|
|
icon = "/icon/folder.svg"
|
|
command = "bash"
|
|
} |