vibed-infra 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/github/__pycache__/notify-vps-pull.cpython-312.pyc +0 -0
- package/lib/__pycache__/generate.cpython-312.pyc +0 -0
- package/lib/__pycache__/github_oidc.cpython-312.pyc +0 -0
- package/lib/__pycache__/load_config.cpython-312.pyc +0 -0
- package/lib/__pycache__/product_config.cpython-312.pyc +0 -0
- package/lib/__pycache__/webhook.cpython-312.pyc +0 -0
- package/lib/persistlog/__pycache__/__init__.cpython-312.pyc +0 -0
- package/package.json +1 -1
- package/skills/system-gateway/SKILL.md +1 -1
- package/templates/host-gateway/setup-tls.sh +27 -7
- package/templates/update-agent/__pycache__/webhook_server.cpython-312.pyc +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@ cd ~/services/gateway
|
|
|
55
55
|
./setup-tls.sh --force # re-issue after host or IP change
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
- **Production:** `setup-tls.sh` issues Let’s Encrypt via docker `certbot/certbot` by default (config under `$GATEWAY_HOME/letsencrypt`, PEMs
|
|
58
|
+
- **Production:** `setup-tls.sh` issues Let’s Encrypt via docker `certbot/certbot` by default (config under `$GATEWAY_HOME/letsencrypt`, PEMs installed into `$GATEWAY_HOME/certs/` — direct `cp` when readable, else alpine container copy+chown for root-owned `live/`). No sudo required when Docker is available. Host certbot + sudo still preferred when present (same `--config-dir` under gateway home). Webroot if gateway is up, else standalone. On failure, fix DNS then re-run `setup-tls.sh`.
|
|
59
59
|
- **Lab/CI:** `TLS_MODE=lab` → multi-SAN self-signed under `./certs/`.
|
|
60
60
|
|
|
61
61
|
## Webhook path (immediate docker pull)
|
|
@@ -254,13 +254,33 @@ EOF
|
|
|
254
254
|
return 0
|
|
255
255
|
fi
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
# Copy PEMs into CERT_DIR without sudo. Docker certbot leaves root-owned live/
|
|
258
|
+
# (mode 700); host path may be readable after sudo chown above.
|
|
259
|
+
install_pems_to_certs() {
|
|
260
|
+
local primary="$1"
|
|
261
|
+
local live="${LE_HOME}/live/${primary}"
|
|
262
|
+
mkdir -p "$CERT_DIR"
|
|
263
|
+
if [[ -r "${live}/fullchain.pem" && -r "${live}/privkey.pem" ]]; then
|
|
264
|
+
cp -L "${live}/fullchain.pem" "${CERT_DIR}/fullchain.pem"
|
|
265
|
+
cp -L "${live}/privkey.pem" "${CERT_DIR}/privkey.pem"
|
|
266
|
+
elif command -v docker >/dev/null 2>&1; then
|
|
267
|
+
# certbot container wrote root-owned live/; copy+chown via alpine
|
|
268
|
+
docker run --rm \
|
|
269
|
+
-v "${LE_HOME}:/etc/letsencrypt:ro" \
|
|
270
|
+
-v "${CERT_DIR}:/out" \
|
|
271
|
+
"${CERTBOT_HELPER_IMAGE:-alpine:3.20}" \
|
|
272
|
+
sh -c "cp -L /etc/letsencrypt/live/${primary}/fullchain.pem /out/fullchain.pem && cp -L /etc/letsencrypt/live/${primary}/privkey.pem /out/privkey.pem && chown $(id -u):$(id -g) /out/fullchain.pem /out/privkey.pem && chmod 644 /out/fullchain.pem && chmod 600 /out/privkey.pem"
|
|
273
|
+
else
|
|
274
|
+
echo "Cannot read ${live} PEMs (root-owned?) and docker unavailable to copy them" >&2
|
|
275
|
+
return 1
|
|
276
|
+
fi
|
|
277
|
+
if [[ ! -f "${CERT_DIR}/fullchain.pem" || ! -f "${CERT_DIR}/privkey.pem" ]]; then
|
|
278
|
+
echo "Failed to install PEMs into ${CERT_DIR}" >&2
|
|
279
|
+
return 1
|
|
280
|
+
fi
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
install_pems_to_certs "$primary"
|
|
264
284
|
chmod 644 "${CERT_DIR}/fullchain.pem"
|
|
265
285
|
chmod 600 "${CERT_DIR}/privkey.pem"
|
|
266
286
|
patch_env_key TLS_FULLCHAIN "${CERT_DIR}/fullchain.pem"
|
|
Binary file
|