fix: make port 1349 the UI port in all modes

Dev mode: Vite serves UI on 1349, Fastify API on 1350 (proxied)
Production/Docker: Fastify serves both UI and API on 1349
This commit is contained in:
Siddharth Kumar Sah
2026-03-22 10:31:11 +08:00
parent 2723d6a75a
commit 80bb0e29a0
4 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
PORT=1349 # In dev: API runs on this port, UI on 1349 (Vite proxies /api here)
# In Docker/production: Fastify serves everything on 1349 (set PORT=1349)
PORT=1350
AUTH_ENABLED=true AUTH_ENABLED=true
DEFAULT_USERNAME=admin DEFAULT_USERNAME=admin
DEFAULT_PASSWORD=admin DEFAULT_PASSWORD=admin
+1 -1
View File
@@ -43,7 +43,7 @@ await app.register(swagger, {
description: "API for Stirling Image — self-hosted image processing suite", description: "API for Stirling Image — self-hosted image processing suite",
version: APP_VERSION, version: APP_VERSION,
}, },
servers: [{ url: `http://localhost:${env.PORT}` }], servers: [{ url: `http://localhost:1349` }],
}, },
}); });
+1 -1
View File
@@ -1,7 +1,7 @@
import { z } from "zod"; import { z } from "zod";
const envSchema = z.object({ const envSchema = z.object({
PORT: z.coerce.number().default(1349), PORT: z.coerce.number().default(1350),
AUTH_ENABLED: z AUTH_ENABLED: z
.enum(["true", "false"]) .enum(["true", "false"])
.default("true") .default("true")
+2 -2
View File
@@ -12,9 +12,9 @@ export default defineConfig({
dedupe: ["react", "react-dom"], dedupe: ["react", "react-dom"],
}, },
server: { server: {
port: 5173, port: 1349,
proxy: { proxy: {
"/api": "http://localhost:1349", "/api": "http://localhost:1350",
}, },
}, },
}); });