mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
+3
-1
@@ -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
|
||||||
|
|||||||
@@ -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,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")
|
||||||
|
|||||||
@@ -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",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user