From 3238747462fd88f504d837beac5bf2cc222335b2 Mon Sep 17 00:00:00 2001 From: "phattaranun.a" Date: Mon, 25 May 2026 00:56:05 +0700 Subject: [PATCH] refactor: remove unused storage environment variables and update file destination in rewrites --- docker-compose.yml | 4 ---- frontend/next.config.mjs | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dce09c5..da47c11 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,8 +37,6 @@ services: NEXT_PUBLIC_FILES_BASE: /files BACKEND_INTERNAL_URL: http://at-transit-backend:${BACKEND_PORT} INTERNAL_API_BASE: http://at-transit-backend:${BACKEND_PORT}/api - STORAGE_INTERNAL_URL: ${STORAGE_URL} - STORAGE_BUCKET_PATH: /buckets/transit image: at-transit-frontend:latest container_name: at-transit-frontend restart: unless-stopped @@ -52,8 +50,6 @@ services: HOSTNAME: 0.0.0.0 INTERNAL_API_BASE: http://at-transit-backend:${BACKEND_PORT}/api BACKEND_INTERNAL_URL: http://at-transit-backend:${BACKEND_PORT} - STORAGE_INTERNAL_URL: ${STORAGE_URL} - STORAGE_BUCKET_PATH: /buckets/transit PORT: 3000 ports: - "${FRONTEND_PORT}:3000" \ No newline at end of file diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index b85b56f..a167361 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -1,10 +1,6 @@ /** @type {import('next').NextConfig} */ const BACKEND_INTERNAL_URL = process.env.BACKEND_INTERNAL_URL || "http://localhost:20001"; -const STORAGE_INTERNAL_URL = - process.env.STORAGE_INTERNAL_URL || process.env.FILER_INTERNAL_URL || "http://localhost:3103"; -const STORAGE_BUCKET_PATH = - process.env.STORAGE_BUCKET_PATH || process.env.FILER_BUCKET_PATH || "/buckets/transit"; const nextConfig = { reactStrictMode: true, @@ -16,7 +12,7 @@ const nextConfig = { return [ { source: "/files/:path*", - destination: `${STORAGE_INTERNAL_URL}${STORAGE_BUCKET_PATH}/:path*` + destination: `${BACKEND_INTERNAL_URL}/files/:path*` }, { source: "/api/:path*",