9 Commits
Author SHA1 Message Date
asepharyanaandClaude Opus 5 21743cedfa chore(infra): remove llm-api service (retired from prod)
Deploy Infra Config / deploy-infra (push) Canceled after 0s
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 18:53:29 +07:00
MythEclipse 63c3b87f39 fix(hamc): hermyhq port 4023→4024, add hermyhq-render worker unit
Deploy Infra Config / deploy-infra (push) Canceled after 0s
- hermyhq.service: PORT 4024 (4023 occupied by pr-agent-bun)
- Caddyfile.prod: hamc.* proxy → 4024
- hermyhq-render.service: new systemd unit for shorts render worker
  (Remotion + edge-tts, runs /opt/hermyhq-renderer)
2026-09-22 20:16:33 +07:00
asepharyana c5c0a961b0 chore(caddy): route pr-agent to Bun server (4023)
Deploy Infra Config / deploy-infra (push) Canceled after 0s
Cut-over pr-agent.asepharyana.my.id from the Python pr_agent server (4002)
to the Bun/TypeScript re-implementation (4023, pr-agent-bun.service).
Verified: webhook -> review -> LLM claude-opus-5 -> persistent comment
published (PR #19 nextjs-template).
2026-09-21 13:38:04 +07:00
asepharyana c25c645818 feat(dev): add dev.asepharyana.my.id Caddy route → 127.0.0.1:3000
Deploy Infra Config / deploy-infra (push) Canceled after 0s
Ephemeral dev preview of the Next.js template — no systemd service; dev
server runs on-demand (bun run dev), Caddy routes :3000, 502s when stopped.
2026-09-20 21:48:22 +07:00
MythEclipse 9e6078af9b feat(infra): add hamc.asepharyana.my.id (hermyhq) Caddy routing + systemd unit
Deploy Infra Config / deploy-infra (push) Canceled after 0s
- Caddy: hamc.asepharyana.my.id -> 127.0.0.1:4023 (import proxy)
- systemd: hermyhq.service (Next.js 16 standalone, profile /nix/var/nix/profiles/hermyhq, env /etc/hermyhq/hermyhq.env)
2026-09-20 15:51:34 +07:00
asepharyana bda852f287 feat(infra): add mcpedia.asepharyana.my.id Caddy block -> local mcpedia (wiki alias)
Deploy Infra Config / deploy-infra (push) Canceled after 0s
2026-09-02 12:31:18 +07:00
asepharyana 754bc2876f fix(caddy): serve gmw.asepharyana.my.id → :4009 (was 525)
Deploy Infra Config / deploy-infra (push) Canceled after 0s
GMW dashboard SSL was broken (Cloudflare 525) because gmw was not in
the Caddyfile — no Let's Encrypt cert / TLS origin for the hostname.
Add gmw.asepharyana.my.id block proxying to gmw-proxy nginx (4009),
same as imphnen. Public dashboard now reachable (200, valid cert).
2026-09-01 20:19:00 +07:00
asepharyana b37daa52b0 chore(infra): remove tools app — Caddy route, README, add-new-app docs
Deploy Infra Config / deploy-infra (push) Canceled after 0s
Project tools dihapus (2026-08-28): GitHub repo + local source + VPS deploy
(3 systemd units + Nix profiles) sudah dihapus. Caddy route
tools.asepharyana.my.id removed; README + docs updated.
ADR 0003 dibiarkan sebagai catatan historis rename.
2026-08-27 21:17:05 +07:00
asepharyana 56cee21e66 ci(infra): sync full infra config (caddy + systemd drop-ins + prometheus), rename workflow to infra-deploy 2026-08-27 20:43:06 +07:00
7 changed files with 110 additions and 25 deletions

No files matched your search

@@ -1,4 +1,4 @@
name: Deploy Caddy Config
name: Deploy Infra Config
on:
push:
@@ -7,10 +7,11 @@ on:
- 'infra/caddy/**'
- 'infra/firewall/**'
- 'infra/systemd/**'
- 'infra/prometheus/**'
workflow_dispatch:
concurrency:
group: caddy-deploy
group: infra-deploy
cancel-in-progress: false
permissions:
@@ -21,16 +22,15 @@ env:
VPS_USER: ${{ secrets.VPS_USER }}
jobs:
deploy-caddy:
deploy-infra:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- name: Validate Caddyfile syntax
run: |
# Real Caddy parser (better than naive brace counting)
curl -fsSL https://caddyserver.com/api/download?os=linux\&arch=amd64 -o /tmp/caddy
curl -fsSL "https://caddyserver.com/api/download?os=linux&arch=amd64" -o /tmp/caddy
chmod +x /tmp/caddy
/tmp/caddy validate --config infra/caddy/Caddyfile.prod --adapter caddyfile 2>&1 | tail -5
echo "✅ Caddyfile valid"
@@ -49,12 +49,39 @@ jobs:
- name: Sync Caddyfile to VPS
run: |
set -e
# Backup current config, then push the new one
ssh "$VPS_USER@$VPS_HOST" "sudo cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.bak-previous"
scp -q infra/caddy/Caddyfile.prod "$VPS_USER@$VPS_HOST":/tmp/Caddyfile.new
ssh "$VPS_USER@$VPS_HOST" "sudo cp /tmp/Caddyfile.new /etc/caddy/Caddyfile && sudo rm -f /tmp/Caddyfile.new"
echo "✅ Caddyfile synced"
- name: Sync systemd drop-ins to VPS
run: |
set -e
if [ -d infra/systemd ]; then
for f in infra/systemd/*; do
[ -f "$f" ] || continue
base=$(basename "$f")
echo " syncing $base"
scp -q "$f" "$VPS_USER@$VPS_HOST":/tmp/"$base"
ssh "$VPS_USER@$VPS_HOST" "sudo mkdir -p /etc/systemd/system && sudo cp /tmp/$base /etc/systemd/system/$base && sudo rm -f /tmp/$base"
done
ssh "$VPS_USER@$VPS_HOST" "sudo systemctl daemon-reload"
echo "✅ systemd drop-ins synced"
else
echo "no infra/systemd/ files"
fi
- name: Sync prometheus targets to VPS
run: |
set -e
if [ -f infra/prometheus/targets.yml ]; then
scp -q infra/prometheus/targets.yml "$VPS_USER@$VPS_HOST":/tmp/targets.yml
ssh "$VPS_USER@$VPS_HOST" "sudo cp /tmp/targets.yml /etc/prometheus/targets.yml 2>/dev/null && sudo rm -f /tmp/targets.yml && sudo systemctl reload prometheus 2>/dev/null || true"
echo "✅ prometheus targets synced"
else
echo "no infra/prometheus/targets.yml"
fi
- name: Reload Caddy
run: |
ssh "$VPS_USER@$VPS_HOST" "sudo systemctl reload caddy || sudo systemctl restart caddy"
@@ -71,4 +98,4 @@ jobs:
000|502|503|504) echo "::error::$u bad status $code"; exit 1 ;;
esac
done
echo "✅ All routes reachable"
echo "✅ All routes reachable"
+1 -2
View File
@@ -12,11 +12,10 @@ Reverse-proxy & infrastructure config for [orangevps](https://asepharyana.my.id)
|------|-----------|-------------|
| [`asepharyana/hub`](https://github.com/asepharyana/hub) | Portfolio SPA (Next.js, port 4003, dashboard) | `hub` |
| [`asepharyana/scraper`](https://github.com/asepharyana/scraper) | Rust/Axum scraper API (port 4091) | `scraper` |
| [`asepharyana/tools`](https://github.com/asepharyana/tools) | Tools: Rust gateway/workers + Next.js frontend (3500/3501) | `tools-gateway`, `tools-workers`, `tools-frontend` |
| [`asepharyana/llm-api`](https://github.com/asepharyana/llm-api) | Rust LLM API (llama.cpp, port 8080) | `llm-api` |
Tiap repo punya `flake.nix` + `.github/workflows/deploy.yml` sendiri:
`nix build .#<pkg>` → `nix copy ssh://` → `nix-env --profile` → `systemctl restart`.
`nix build .#<pkg>` → **push ke Attic binary cache** (`attic.asepharyana.my.id/asepharyana`) → VPS substitute via `nix-store --realise` → `nix-env --profile` → `systemctl restart`.
Push ke `main` (atau `workflow_dispatch`) langsung deploy; tidak ada lagi pointer submodule.
## Infra di Repo Ini
+1 -1
View File
@@ -4,7 +4,7 @@ Panduan untuk menambahkan service baru di ekosistem `asepharyana/infra` (2026-08
## Prinsip
- **Aplikasi hidup di repo sendiri** (`hub`, `scraper`, `tools`, `llm-api`) dengan
- **Aplikasi hidup di repo sendiri** (`hub`, `scraper`, `llm-api`) dengan
`flake.nix` + `.github/workflows/deploy.yml` mandiri. Repo infra TIDAK berisi kode app.
- Repo infra (`asepharyana/infra`) hanya mengatur **reverse proxy & config VPS**.
+33 -10
View File
@@ -51,18 +51,14 @@ imphnen.asepharyana.my.id {
import proxy 4009
}
gmw.asepharyana.my.id {
import proxy 4009
}
scraper.asepharyana.my.id, api.asepharyana.my.id, scraper.asepharyana.web.id, api.asepharyana.web.id {
import proxy 4091
}
ai.asepharyana.my.id, ai.asepharyana.web.id {
import proxy 4010
}
tools.asepharyana.my.id, tools.asepharyana.web.id {
import proxy 4007
}
9router.asepharyana.my.id {
# LLM streaming: 9router combo models punya TTFT sampe 30-40s (deepseek,
# fallback chain). Default (proxy) response_header_timeout 30s / read 60s
@@ -84,7 +80,7 @@ tools.asepharyana.my.id, tools.asepharyana.web.id {
}
pr-agent.asepharyana.my.id {
import proxy 4002
import proxy 4023
}
lidm.asepharyana.my.id {
@@ -152,7 +148,34 @@ wiki.asepharyana.my.id {
reverse_proxy 127.0.0.1:4020
}
}
mcpedia.asepharyana.my.id {
import proxy 4016
# Alias mcpedia -> wiki (same app): observability/trpc/hooks/health routes.
handle /dashboard {
reverse_proxy 127.0.0.1:4020
}
handle /metrics {
reverse_proxy 127.0.0.1:4020
}
handle /trpc/* {
reverse_proxy 127.0.0.1:4020
}
handle /hooks/* {
reverse_proxy 127.0.0.1:4020
}
handle /health {
reverse_proxy 127.0.0.1:4020
}
}
mcp.asepharyana.my.id {
import proxy 4021
}
}
hamc.asepharyana.my.id {
import proxy 4024
}
dev.asepharyana.my.id {
import proxy 3000
}
-4
View File
@@ -11,7 +11,3 @@
labels:
service: gmw-backend
__metrics_path__: /api/metrics
# llm-api expose /metrics sejak 2026-08-03 (feat metrics):
- targets: ['127.0.0.1:4010']
labels:
service: llm-api
+22
View File
@@ -0,0 +1,22 @@
[Unit]
Description=Hermy HQ — Shorts render worker (Remotion + TTS)
After=network.target postgresql.service hermyhq.service
Wants=hermyhq.service
[Service]
Type=simple
User=code
Group=code
WorkingDirectory=/opt/hermyhq-renderer
EnvironmentFile=/etc/hermyhq/hermyhq.env
Environment=RENDER_DIR=/data/renders
Environment=RENDER_SCRATCH=/tmp/hamc-render
Environment=REMOTION_ROOT=/opt/hermyhq-renderer/src/remotion
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
Environment=EDGE_TTS_BIN=/home/code/.hermes/hermes-agent/venv/bin/edge-tts
ExecStart=/usr/bin/node /opt/hermyhq-renderer/scripts/render-worker.mjs
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
+18
View File
@@ -0,0 +1,18 @@
[Unit]
Description=Hermy HQ — Hermes mission control dashboard (Next.js 16 standalone)
After=network.target postgresql.service
[Service]
Type=simple
User=code
Group=code
Environment=NODE_ENV=production
Environment=HOSTNAME=127.0.0.1
Environment=PORT=4024
EnvironmentFile=/etc/hermyhq/hermyhq.env
ExecStart=/nix/var/nix/profiles/hermyhq/bin/hermyhq
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target