Skip to content

Commit bd769cd

Browse files
authored
Merge pull request #2 from emergentmethods/update-env
fix: Update api base url env variable name
2 parents cf5807f + b16b4a3 commit bd769cd

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
NEXT_PUBLIC_API_BASE_URL=http://localhost:8070
1+
API_BASE_URL=http://localhost:8070

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN apk update
66
RUN apk add --no-cache libc6-compat
77

88
# Setup pnpm on the alpine base
9-
FROM alpine as base
9+
FROM alpine AS base
1010
RUN npm install pnpm --global
1111
RUN pnpm config set store-dir ~/.pnpm-store
1212

@@ -23,7 +23,7 @@ RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfi
2323
# Copy source code
2424
COPY . .
2525

26-
ENV NEXT_TELEMETRY_DISABLED 1
26+
ENV NEXT_TELEMETRY_DISABLED=1
2727
RUN pnpm build
2828

2929
# Final image

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The easiest way to use the Flowdapt dashboard is by simply running the Docker im
2020
docker run --network=host ghcr.io/emergentmethods/flowdapt-dashboard:latest
2121
```
2222

23-
It will run the dashboard on `http://localhost:3030` and it will look for a running Flowdapt server on `http://localhost:8070`. If you are running Flowdapt at a different location, you can specify that by controlling the environment variable `NEXT_PUBLIC_API_BASE_URL=http://localhost:8070`.
23+
It will run the dashboard on `http://localhost:3030` and it will look for a running Flowdapt server on `http://localhost:8070`. If you are running Flowdapt at a different location, you can specify that by controlling the environment variable `API_BASE_URL=http://localhost:8070`.
2424

2525
### Project Setup Guide
2626

src/lib/util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ export const getLanguage = (props: Flowdapt.IPageParams) => {
7777
* @returns The created Configuration object with the basePath set.
7878
*/
7979
export const getClient = () => {
80+
const baseUrl = process.env.API_BASE_URL || "http://localhost:8070";
8081
const flowdaptSDKClient = new FlowdaptSDK({
81-
baseUrl: process.env.NEXT_PUBLIC_API_BASE_URL,
82+
baseUrl,
8283
});
8384

8485
return flowdaptSDKClient;

types/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface Window {
77
declare namespace NodeJS {
88
interface ProcessEnv {
99
// Declare environment variables here
10-
NEXT_PUBLIC_API_URL: string;
10+
API_BASE_URL: string;
1111
}
1212
}
1313

0 commit comments

Comments
 (0)