Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .smb/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source = "."
path = "apps/web/smbcloudweb"
package_manager = "pnpm"
pm2_app = "smbcloud-web"
port = 3028
port = 3030
deployment_method = 1
created_at = "2025-06-09T17:55:01.800Z"
updated_at = "2025-06-09T17:55:01.800Z"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<a href="LICENSE">License</a>
</p>
<p align="center">
<a href="https://smbcloud.xyz/"><img alt="Deploy to smbCloud" src="https://github.com/smbcloudXYZ/smbcloud-cli/blob/development/deploy.svg"></a>
<a href="https://smbcloud.xyz/"><img alt="Runs on smbCloud" src="https://img.shields.io/badge/Runs%20on-smbCloud-0f172a?style=for-the-badge"></a>
<a href="LICENSE"><img alt="Apache-2.0 License" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg"></a>
<img alt="Next.js 16" src="https://img.shields.io/badge/Next.js-16-black?logo=next.js">
<img alt="pnpm" src="https://img.shields.io/badge/pnpm-workspace-f69220?logo=pnpm&logoColor=white">
Expand Down
2 changes: 1 addition & 1 deletion ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
env_production: {
NODE_ENV: "production",
// The standalone server reads PORT and HOSTNAME from env.
PORT: "3028",
PORT: "3030",
HOSTNAME: "127.0.0.1",

NEXT_TELEMETRY_DISABLED: "1",
Expand Down
59 changes: 59 additions & 0 deletions nginx/smbcloud.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ─────────────────────────────────────────────────────────────
# smbcloud.xyz — minimal Nginx reverse-proxy for Next.js SSR
#
# This follows the simpler smbcloud-web-console pattern:
# proxy everything to the standalone Next.js server and let the app
# serve both SSR responses and /_next/static assets.
#
# Next.js runs via PM2: node server.js (PORT=3030, HOSTNAME=127.0.0.1)
# Deploy path: /home/git/apps/web/smbcloudweb/
# PM2 app: smbcloud-web
#
# Keep the port aligned in three places:
# 1. .smb/config.toml
# 2. PM2 env / ecosystem.config.js
# 3. this nginx proxy target
# ─────────────────────────────────────────────────────────────

server {
listen 80;
listen [::]:80;
server_name smbcloud.xyz www.smbcloud.xyz;

return 301 https://$host$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name smbcloud.xyz www.smbcloud.xyz;

ssl_certificate /etc/letsencrypt/live/smbcloud.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/smbcloud.xyz/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

access_log /var/log/nginx/smbcloud.xyz.access.log;
error_log /var/log/nginx/smbcloud.xyz.error.log;

location / {
proxy_pass http://127.0.0.1:3030;
proxy_http_version 1.1;

proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
proxy_buffering off;
proxy_cache_bypass $http_upgrade;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build:content": "contentlayer2 build",
"preview": "next build && next start",
"start": "next start",
"start-smbcloudweb": "next start -p 3015",
"start-smbcloudweb": "next start -p 3030",
"lint": "eslint ."
},
"dependencies": {
Expand Down