refactor: remove unused storage environment variables and update file destination in rewrites
This commit is contained in:
1 parent
2a1854ab08
commit
3238747462
2 files changed
+1
-9
No files matched your search
@@ -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"
|
||||
@@ -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*",
|
||||
|
||||
Reference in new issue
Block a user