fix: correct public dir path for Docker (dist/src → ../../public)
This commit is contained in:
+3
-3
@@ -45,9 +45,9 @@ app.get('/api/health', (_req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// ─── Static files (production) ───────────────────────
|
// ─── Static files (production) ───────────────────────
|
||||||
// In Docker, client dist is at /app/public
|
// In Docker: __dirname = /app/dist/src → ../../public = /app/public
|
||||||
// Locally after build, resolve relative to compiled output
|
// Locally: __dirname = server/src → ../../public (not used in dev)
|
||||||
const publicDir = path.resolve(__dirname, '../public');
|
const publicDir = path.resolve(__dirname, '../../public');
|
||||||
app.use(express.static(publicDir));
|
app.use(express.static(publicDir));
|
||||||
|
|
||||||
// SPA fallback — serve index.html for all non-API routes
|
// SPA fallback — serve index.html for all non-API routes
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"build": "20260608-1607",
|
"build": "20260608-1610",
|
||||||
"buildDate": "2026-06-08T16:07:41.1459281+07:00"
|
"buildDate": "2026-06-08T16:10:55.1482171+07:00"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user