patchwork-os 0.2.0-beta.6.canary.19 → 0.2.0-beta.6.canary.20
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/deploy/bootstrap-vps.sh +14 -9
- package/package.json +1 -1
package/deploy/bootstrap-vps.sh
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# deploy/bootstrap-vps.sh
|
|
3
|
-
# Full VPS bootstrap for
|
|
4
|
-
# Run as root on a fresh Ubuntu 24.04 VPS
|
|
5
|
-
# Usage: bash bootstrap-vps.sh
|
|
3
|
+
# Full VPS bootstrap for a single Patchwork OS bridge.
|
|
4
|
+
# Run as root on a fresh Ubuntu 24.04 VPS.
|
|
5
|
+
# Usage: PATCHWORK_DOMAIN=your.tld PATCHWORK_ACME_EMAIL=you@your.tld bash bootstrap-vps.sh
|
|
6
6
|
|
|
7
7
|
set -euo pipefail
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
# Domain + ACME contact are deployment-specific — supply them via the
|
|
10
|
+
# environment so no real domain/email is committed to version control.
|
|
11
|
+
DOMAIN="${PATCHWORK_DOMAIN:?set PATCHWORK_DOMAIN, e.g. your.tld}"
|
|
12
|
+
EMAIL="${PATCHWORK_ACME_EMAIL:?set PATCHWORK_ACME_EMAIL, e.g. you@your.tld}"
|
|
11
13
|
BRIDGE_PORT=3284
|
|
12
14
|
BRIDGE_USER="patchwork"
|
|
13
15
|
BRIDGE_HOME="/opt/patchwork"
|
|
@@ -81,7 +83,6 @@ ExecStart=${BRIDGE_BIN} \\
|
|
|
81
83
|
--vps \\
|
|
82
84
|
--issuer-url https://${DOMAIN} \\
|
|
83
85
|
--cors-origin https://claude.ai \\
|
|
84
|
-
--cors-origin https://app.patchworkos.com \\
|
|
85
86
|
--fixed-token ${FIXED_TOKEN}
|
|
86
87
|
|
|
87
88
|
Restart=always
|
|
@@ -117,11 +118,11 @@ ufw status
|
|
|
117
118
|
|
|
118
119
|
# ── 8. Nginx config — HTTP only first (certbot needs nginx up to issue cert) ──
|
|
119
120
|
info "Writing nginx config (HTTP only)..."
|
|
120
|
-
cat > /etc/nginx/sites-available/
|
|
121
|
+
cat > /etc/nginx/sites-available/patchwork <<'NGINX'
|
|
121
122
|
server {
|
|
122
123
|
listen 80;
|
|
123
124
|
listen [::]:80;
|
|
124
|
-
server_name
|
|
125
|
+
server_name __DOMAIN__ www.__DOMAIN__;
|
|
125
126
|
|
|
126
127
|
location /.well-known/acme-challenge/ { root /var/www/html; }
|
|
127
128
|
|
|
@@ -140,7 +141,11 @@ server {
|
|
|
140
141
|
}
|
|
141
142
|
NGINX
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
# Substitute the deployment domain into the just-written config (the heredoc
|
|
145
|
+
# is quoted so nginx's own $variables survive un-expanded).
|
|
146
|
+
sed -i "s/__DOMAIN__/${DOMAIN}/g" /etc/nginx/sites-available/patchwork
|
|
147
|
+
|
|
148
|
+
ln -sf /etc/nginx/sites-available/patchwork /etc/nginx/sites-enabled/patchwork
|
|
144
149
|
rm -f /etc/nginx/sites-enabled/default
|
|
145
150
|
|
|
146
151
|
nginx -t
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchwork-os",
|
|
3
|
-
"version": "0.2.0-beta.6.canary.
|
|
3
|
+
"version": "0.2.0-beta.6.canary.20",
|
|
4
4
|
"description": "Your personal AI runtime, local-first. Patchwork OS gives any AI model a consistent set of tools, YAML recipes, a delegation policy with approval queue, and a durable trace memory — all on your machine, all under your policy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|