pack Ts too!

This commit is contained in:
lda
2026-04-15 03:35:15 +07:00 Unverified
parent f59fd7a846
commit c450e297c8
3 changed files with 11 additions and 8 deletions
@@ -6,13 +6,13 @@
# #
# Replace cp.example.com with your public control-plane domain. # Replace cp.example.com with your public control-plane domain.
cp.example.com { wakey.ldlda.com {
encode zstd gzip encode zstd gzip
# Public agent-facing endpoints. # Public agent-facing endpoints.
@public path /healthz /api/v1/agents/enroll /api/v1/agent/ws @public path /healthz /api/v1/agents/enroll /api/v1/agent/ws
handle @public { handle @public {
reverse_proxy 127.0.0.1:8787 reverse_proxy 127.0.0.1:6767
} }
# Admin surface requires Cloudflare Access headers. # Admin surface requires Cloudflare Access headers.
@@ -21,7 +21,7 @@ cp.example.com {
handle @admin { handle @admin {
handle @cf_access { handle @cf_access {
reverse_proxy 127.0.0.1:8787 reverse_proxy 127.0.0.1:6767
} }
respond "forbidden" 403 respond "forbidden" 403
} }
+2 -2
View File
@@ -5,8 +5,8 @@ Wants=network-online.target
[Service] [Service]
Type=simple Type=simple
User=wakey User=lda
Group=wakey Group=lda
WorkingDirectory=/opt/wakey WorkingDirectory=/opt/wakey
ExecStart=/opt/wakey/bin/wakey-control-plane serve --config-file /etc/wakey-control-plane/config.toml ExecStart=/opt/wakey/bin/wakey-control-plane serve --config-file /etc/wakey-control-plane/config.toml
Restart=on-failure Restart=on-failure
+6 -3
View File
@@ -62,8 +62,9 @@ fi
[ -f "$BINARY" ] || { echo "missing binary: $BINARY" >&2; exit 1; } [ -f "$BINARY" ] || { echo "missing binary: $BINARY" >&2; exit 1; }
[ -f "$UI_DIST/index.html" ] || { echo "missing UI dist index: $UI_DIST/index.html" >&2; exit 1; } [ -f "$UI_DIST/index.html" ] || { echo "missing UI dist index: $UI_DIST/index.html" >&2; exit 1; }
[ -f "scripts/update_wakey_cc.sh" ] || { echo "missing updater script" >&2; exit 1; } [ -f "scripts/update_wakey_cc.sh" ] && [ -f "scripts/update_wakey_cc_from_repo.sh" ] || { echo "missing updater scripts" >&2; exit 1; }
[ -f "deploy/systemd/wakey-cc.service" ] || { echo "missing systemd template" >&2; exit 1; } [ -f "deploy/systemd/wakey-cc.service" ] || { echo "missing systemd template" >&2; exit 1; }
[ -f "deploy/control-plane.Caddyfile" ] || { echo "missing Caddyfile" >&2; exit 1; }
mkdir -p "$OUT_DIR" mkdir -p "$OUT_DIR"
STAGING="$OUT_DIR/wakey-cc-stage.$$" STAGING="$OUT_DIR/wakey-cc-stage.$$"
@@ -75,9 +76,11 @@ mkdir -p "$STAGING/bin" "$STAGING/ui" "$STAGING/scripts" "$STAGING/deploy/system
cp "$BINARY" "$STAGING/bin/wakey-control-plane" cp "$BINARY" "$STAGING/bin/wakey-control-plane"
cp -a "$UI_DIST" "$STAGING/ui/dist" cp -a "$UI_DIST" "$STAGING/ui/dist"
cp "scripts/update_wakey_cc.sh" "$STAGING/scripts/update_wakey_cc.sh" cp "scripts/update_wakey_cc.sh" "$STAGING/scripts/update_wakey_cc.sh"
cp "scripts/update_wakey_cc_from_repo.sh" "$STAGING/scripts/update_wakey_cc_from_repo.sh"
cp "deploy/systemd/wakey-cc.service" "$STAGING/deploy/systemd/wakey-cc.service" cp "deploy/systemd/wakey-cc.service" "$STAGING/deploy/systemd/wakey-cc.service"
cp "deploy/control-plane.Caddyfile" "$STAGING/deploy/control-plane.Caddyfile"
chmod +x "$STAGING/bin/wakey-control-plane" "$STAGING/scripts/update_wakey_cc.sh" chmod +x "$STAGING/bin/wakey-control-plane" "$STAGING/scripts/update_wakey_cc.sh" "$STAGING/scripts/update_wakey_cc_from_repo.sh" "$STAGING/deploy/control-plane.Caddyfile"
( (
cd "$STAGING" cd "$STAGING"
@@ -87,4 +90,4 @@ chmod +x "$STAGING/bin/wakey-control-plane" "$STAGING/scripts/update_wakey_cc.sh
rm -rf "$STAGING" rm -rf "$STAGING"
echo "Bundle package: $OUT_DIR/$PKG" echo "Bundle package: $OUT_DIR/$PKG"
echo "Contains: bin/wakey-control-plane, ui/dist, scripts/update_wakey_cc.sh, deploy/systemd/wakey-cc.service" echo "Contains: bin/wakey-control-plane, ui/dist, scripts/update_wakey_cc.sh, scripts/update_wakey_cc_from_repo.sh, deploy/systemd/wakey-cc.service, deploy/control-plane.Caddyfile"