web: 管理画面のポートを3001に変更
- composeのwebを --port 3001 で起動し、ホスト側も3001に公開 - APIのCORS許可オリジン(WEB_ORIGIN)とconfig.tsのデフォルトを3001に追従
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
NODE_ENV=development
|
||||
PORT=4000
|
||||
PUBLIC_BASE_URL=http://localhost:4000
|
||||
WEB_ORIGIN=http://localhost:3000
|
||||
WEB_ORIGIN=http://localhost:3001
|
||||
NEXT_PUBLIC_AUTH_MODE=demo
|
||||
|
||||
# --- Storage (MinIO via docker compose) -------------------------------------
|
||||
|
||||
@@ -15,7 +15,7 @@ const schema = z.object({
|
||||
HOST: z.string().default("0.0.0.0"),
|
||||
PORT: numberFromEnv.default(4000),
|
||||
PUBLIC_BASE_URL: z.string().url().default("http://localhost:4000"),
|
||||
WEB_ORIGIN: z.string().url().default("http://localhost:3000"),
|
||||
WEB_ORIGIN: z.string().url().default("http://localhost:3001"),
|
||||
DATABASE_URL: z.string().optional(),
|
||||
STORAGE_MODE: z.enum(["local", "s3"]).default("local"),
|
||||
LOCAL_STORAGE_DIR: z.string().default(".data/storage"),
|
||||
|
||||
@@ -78,7 +78,7 @@ export async function createServer() {
|
||||
// them in memory, so a 5 GiB ADP doesn't exhaust the process.
|
||||
app.addContentTypeParser(["application/zip", "application/octet-stream"], (_request, payload, done) => done(null, payload));
|
||||
await app.register(cookie);
|
||||
// The control plane (web :3000) and API (:4000) are cross-origin, so allow
|
||||
// The control plane (web :3001) and API (:4000) are cross-origin, so allow
|
||||
// the write methods the dashboard uses; @fastify/cors otherwise defaults to
|
||||
// GET/HEAD/POST and blocks PATCH/PUT in the browser.
|
||||
await app.register(cors, { origin: true, credentials: true, methods: ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"] });
|
||||
|
||||
+4
-5
@@ -77,7 +77,7 @@ services:
|
||||
AUTH_MODE: ${AUTH_MODE:-demo}
|
||||
PROCESS_INLINE: "false"
|
||||
PUBLIC_BASE_URL: ${PUBLIC_BASE_URL:-http://localhost:4000}
|
||||
WEB_ORIGIN: ${WEB_ORIGIN:-http://localhost:3000}
|
||||
WEB_ORIGIN: ${WEB_ORIGIN:-http://localhost:3001}
|
||||
ports:
|
||||
- "4000:4000"
|
||||
depends_on:
|
||||
@@ -108,14 +108,13 @@ services:
|
||||
|
||||
web:
|
||||
<<: *altdock-app
|
||||
# vinext uses --hostname (not vite's --host) to bind the dev server.
|
||||
command: npm run dev -- --hostname 0.0.0.0
|
||||
# vinext uses --hostname/--port (not vite's --host) to bind the dev server.
|
||||
command: npm run dev -- --hostname 0.0.0.0 --port 3001
|
||||
environment:
|
||||
HOST: 0.0.0.0
|
||||
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-http://localhost:4000}
|
||||
NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE:-demo}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3001:3001"
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_started
|
||||
|
||||
Reference in New Issue
Block a user