Configure smbCloud deployment for Siti AI landing page
Set up the deploy config pointing to the web/ Next.js app (nextjs-ssr, port 3034, PM2 process 'siti-web'). The remote server will serve the build from apps/web/sitiai under the git user's home. The web app is already configured for standalone output and has the correct build + start scripts. The ecosystem.config.js drives PM2. Deploy with: smb deploy (after 'smb login') Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
paydii committed
Jul 15, 2026 at 16:54 UTC
743ab5bf356c0a5628415dd2dd09a64845d452f1
2 files changed
+85
-7
.smb/config.toml
+13
-7
@@ -1,16 +1,22 @@
1
# smbCloud deploy configuration for the Siti AI landing page (web/).
2
#
3
-# This file intentionally carries only the app *identity*. Everything else —
4
-# project id, remote path, port, pm2 app name, deployment method, package
5
-# manager — is stored server-side against the FrontendApp record and fetched by
6
-# the CLI at deploy time (GET /v1/frontend_apps/{id}/deploy_config), then merged
7
-# in locally. Keeping infra topology off the public repo is deliberate.
8
-#
3
# Deploy with: smb deploy (requires `smb login`)
4
5
name = "sitiai"
6
+description = "Siti AI — private on-device personal assistant landing page."
7
8
[project]
9
id = 59
10
frontend_app_id = "1c28381c-7f8f-4637-822c-e2b31424448c"
16
-source = "web" # local Next.js app directory to deploy
11
+# Local Next.js app directory to deploy (workspace member).
12
+source = "web"
13
+# Remote runtime directory on the server, under the git user's home.
14
+path = "apps/web/sitiai"
15
+# Deployment method.
16
+kind = "nextjs-ssr"
17
+# Package manager for the web/ workspace.
18
+package_manager = "pnpm"
19
+# PM2 process name on the server.
20
+pm2_app = "siti-web"
21
+# Port for the Next.js server (also set in web/ecosystem.config.js and web/nginx).
22
+port = 3034
web/ecosystem.config.js
new
+72
@@ -0,0 +1,72 @@
1
+/**
2
+ * PM2 Ecosystem Configuration for Siti AI Landing Page - Production
3
+ *
4
+ * Isolated environment configuration for multi-tenant deployment.
5
+ *
6
+ * Usage:
7
+ * mkdir -p /home/git/apps/web/sitiai/logs
8
+ * cd /home/git/apps/web/sitiai
9
+ * pm2 start ecosystem.config.js --env production
10
+ * pm2 restart siti-web
11
+ * pm2 logs siti-web
12
+ *
13
+ * Keep the port (3034) aligned in three places:
14
+ * 1. ../.smb/config.toml ([project] entry, `port`)
15
+ * 2. this ecosystem file (PORT)
16
+ * 3. nginx/sitiai.com proxy target (if applicable)
17
+ */
18
+
19
+module.exports = {
20
+ apps: [
21
+ {
22
+ name: "siti-web",
23
+
24
+ // Runs from the standalone Next.js server entrypoint.
25
+ script: "node",
26
+ args: "server.js",
27
+
28
+ cwd: "/home/git/apps/web/sitiai",
29
+
30
+ instances: 1,
31
+ exec_mode: "fork",
32
+
33
+ autorestart: true,
34
+ watch: false,
35
+ max_memory_restart: "1G",
36
+
37
+ min_uptime: "10s",
38
+ max_restarts: 10,
39
+ restart_delay: 4000,
40
+
41
+ error_file: "/home/git/apps/web/sitiai/logs/pm2-error.log",
42
+ out_file: "/home/git/apps/web/sitiai/logs/pm2-out.log",
43
+ log_file: "/home/git/apps/web/sitiai/logs/pm2-combined.log",
44
+ time: true,
45
+ log_date_format: "YYYY-MM-DD HH:mm:ss Z",
46
+ merge_logs: true,
47
+
48
+ env_production: {
49
+ NODE_ENV: "production",
50
+ // The standalone server reads PORT and HOSTNAME from env.
51
+ PORT: "3034",
52
+ HOSTNAME: "127.0.0.1",
53
+
54
+ NEXT_TELEMETRY_DISABLED: "1",
55
+ APP_NAME: "siti-web",
56
+ APP_ID: "siti-web-prod",
57
+ },
58
+
59
+ node_args: [
60
+ "--max-old-space-size=2048",
61
+ "--max-http-header-size=16384",
62
+ ].join(" "),
63
+
64
+ kill_timeout: 5000,
65
+ wait_ready: false,
66
+ listen_timeout: 10000,
67
+ shutdown_with_message: false,
68
+
69
+ vizion: false,
70
+ },
71
+ ],
72
+};