- Cargo workspace with hiy-server (axum 0.7 + sqlx SQLite + tokio) - SQLite schema: apps, deploys, env_vars (inline migrations, no daemon) - Background build worker: sequential queue, streams stdout/stderr to DB - REST API: CRUD for apps, deploys, env vars; GitHub webhook with HMAC-SHA256 - SSE endpoint for live build log streaming - Monospace HTMX-free dashboard: app list + per-app detail, log viewer, env editor - builder/build.sh: clone/pull → detect strategy (Dockerfile/buildpack/static) → docker build → swap container → update Caddy via admin API → prune images - infra/docker-compose.yml + Dockerfile.server for local dev (no Pi needed) - proxy/Caddyfile: auto-HTTPS off for local, comment removed for production - .env.example Compiles clean (zero warnings). Run locally: cp .env.example .env && cargo run --bin hiy-server https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
29 lines
737 B
Caddyfile
29 lines
737 B
Caddyfile
# HIY — Caddyfile
|
|
#
|
|
# Local development: auto-HTTPS is disabled; everything runs on :80.
|
|
# Production (Pi): remove the `auto_https off` line, set your real email,
|
|
# and Caddy will obtain Let's Encrypt certificates automatically.
|
|
#
|
|
# Wildcard TLS on the Pi (recommended):
|
|
# tls your@email.com {
|
|
# dns cloudflare {env.CLOUDFLARE_API_TOKEN}
|
|
# }
|
|
{
|
|
# Admin API — used by build.sh to update routes dynamically.
|
|
admin 0.0.0.0:2019
|
|
|
|
# Comment this out on the Pi with a real domain.
|
|
auto_https off
|
|
}
|
|
|
|
# Fallback: serves the HIY dashboard itself.
|
|
:80 {
|
|
reverse_proxy server:3000
|
|
}
|
|
|
|
# Example of what the build script adds via the Caddy API:
|
|
#
|
|
# myapp.yourdomain.com {
|
|
# reverse_proxy <container-ip>:3000
|
|
# }
|