Skip to content

Commit 5d9718e

Browse files
Minimal self-host fix: dashboard rewrites and NEXT_PUBLIC_API_URL only (#1241)
dashboard: proxy /auth and /opsboard to API; pass NEXT_PUBLIC_API_URL via compose Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Alex <[email protected]>
1 parent 9e28960 commit 5d9718e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/compose.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ services:
4646
build:
4747
context: ./dashboard
4848
dockerfile: Dockerfile
49+
args:
50+
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
51+
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
52+
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
53+
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY}
4954
ports:
5055
- '3000:3000'
5156
environment:
@@ -56,6 +61,7 @@ services:
5661
SUPABASE_PROJECT_ID: ${SUPABASE_PROJECT_ID}
5762

5863
# Application URLs
64+
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
5965
NEXT_PUBLIC_APP_URL: ${APP_URL}
6066
NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL}
6167

app/dashboard/next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ const nextConfig = {
8383
source: '/functions/v1/:path*',
8484
destination: 'https://qjkcnuesiiqjpohzdjjm.supabase.co/functions/v1/:path*',
8585
},
86+
{
87+
source: '/auth/:path*',
88+
destination: `${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'}/auth/:path*`,
89+
},
90+
{
91+
source: '/opsboard/:path*',
92+
destination: `${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'}/opsboard/:path*`,
93+
},
8694
{
8795
source: '/logs/:path*',
8896
destination: `${process.env.NEXT_PUBLIC_API_URL || 'https://api.agentops.ai'}/v3/logs/:path*`,

0 commit comments

Comments
 (0)