Skip to content

Commit 384a136

Browse files
ldanilekConvex, Inc.
authored and
Convex, Inc.
committed
[self-host] fix dashboard and generate_key env vars (#33870)
1. fix the mixed up `./generate_key` arguments 2. `NEXT_PUBLIC_ADMIN_KEY` is unused, so remove it 3. `NEXT_PUBLIC_DEPLOYMENT_URL` is baked in at nextjs build-time, so we need to set it at build time, otherwise we get errors when ConvexReactClient tries to connect to url=undefined. I don't know how to fix this, but to unblock the build let's hard-code the value at build time to the default http://127.0.0.1:3210 GitOrigin-RevId: 80f1ff612eaa6cd2b76bdbb4ffd787ee21ccf058
1 parent a25e92a commit 384a136

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

self-hosted/Dockerfile.dashboard

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ RUN git clone https://github.com/get-convex/convex-backend.git .
99
WORKDIR /app/npm-packages/dashboard-self-hosted
1010
RUN npm install -g @microsoft/rush
1111
RUN rush update
12+
# NEXT_PUBLIC_DEPLOYMENT_URL is baked into the nextjs build
13+
# TODO: Make this configurable at runtime
14+
ENV NEXT_PUBLIC_DEPLOYMENT_URL="http://127.0.0.1:3210"
1215
RUN rush build -t dashboard-self-hosted
1316

1417
EXPOSE 6791

self-hosted/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ services:
3030
- "${DASHBOARD_PORT:-6791}:6791"
3131
environment:
3232
- NEXT_PUBLIC_DEPLOYMENT_URL=http://127.0.0.1:${PORT:-3210}
33-
- NEXT_PUBLIC_ADMIN_KEY=${ADMIN_KEY}
3433
depends_on:
3534
backend:
3635
condition: service_healthy

self-hosted/generate_admin_key.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
source ./read_credentials.sh
66

7-
ADMIN_KEY=$(./generate_key "$INSTANCE_SECRET" "$INSTANCE_NAME")
7+
ADMIN_KEY=$(./generate_key "$INSTANCE_NAME" "$INSTANCE_SECRET")
88

99
echo "$ADMIN_KEY"
1010

0 commit comments

Comments
 (0)