Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

Correct the production Next.js service path for pnpm monorepo standalone output: run the generated apps/web/server.js beneath the preserved standalone module root and document the matching static-asset placement.

Commit
ff60d2a07a245dc7d709b2fba121371a83c8ca99
Author
Leitwolf11 ·
Parents
c53ae2482c50

Files · Download .tar.gz

Changes

 ops/README.md                     | 16 ++++++++++------
 ops/systemd/progmaweb-web.service |  4 ++--
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/ops/README.md b/ops/README.md
index 2c8c0c6..13ed3fa 100644
--- a/ops/README.md
+++ b/ops/README.md
@@ -12,14 +12,18 @@ release atomically. The account API and Next.js frontend listen only on loopback
     api/
       Progmaweb.Api
     web/
-      server.js
-      .next/static/
-      public/
+      node_modules/
+      apps/web/
+        server.js
+        .next/static/
+        public/
 ```
 
-The web directory is produced by Next.js standalone output. Copy `.next/static` beside the standalone `.next` directory
-because Next.js intentionally does not include static or public assets in the standalone bundle. The API is published as
-a framework-dependent Linux x64 executable and uses the server's supported .NET runtime.
+The web directory is the full Next.js standalone output. In this pnpm monorepo the runnable server is emitted at
+`apps/web/server.js`; root-level standalone modules must remain above it. Copy `.next/static` into
+`apps/web/.next/static` and `public` into `apps/web/public`, because Next.js intentionally excludes those assets from the
+standalone bundle. The API is published as a framework-dependent Linux x64 executable and uses the server's supported
+.NET runtime.
 
 ## Activation contract
 
diff --git a/ops/systemd/progmaweb-web.service b/ops/systemd/progmaweb-web.service
index 1452d6d..7af5538 100644
--- a/ops/systemd/progmaweb-web.service
+++ b/ops/systemd/progmaweb-web.service
@@ -8,8 +8,8 @@ Requires=progmaweb-api.service
 Type=exec
 User=progmaweb
 Group=progmaweb
-WorkingDirectory=/srv/progmaweb/current/web
-ExecStart=/opt/progmaweb/node/bin/node /srv/progmaweb/current/web/server.js
+WorkingDirectory=/srv/progmaweb/current/web/apps/web
+ExecStart=/opt/progmaweb/node/bin/node /srv/progmaweb/current/web/apps/web/server.js
 Environment=NODE_ENV=production
 Environment=HOSTNAME=127.0.0.1
 Environment=PORT=3010