Skip to content

Commit 5be93cc

Browse files
committed
Add BASE_URI env variable
1 parent 811dc2a commit 5be93cc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml
55

66
## Frontend variables
77
FRONTEND_PORT=3000
8+
# BASE_URI only needs to be provided if hosting outside of cluster
9+
BASE_URI=
810

911
## Question service variables
1012
QUESTION_SVC_PORT=

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ services:
33
build:
44
context: ./frontend
55
args:
6+
- BASE_URI=$BASE_URI
67
- USER_SVC_PORT=$USER_SVC_PORT
78
- QUESTION_SVC_PORT=$QUESTION_SVC_PORT
89
- MATCHING_SVC_PORT=$MATCHING_SVC_PORT

frontend/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Base stage
22
FROM node:20-alpine AS base
3-
ARG USER_SVC_PORT \
3+
ARG BASE_URI \
4+
USER_SVC_PORT \
45
QUESTION_SVC_PORT \
56
MATCHING_SVC_PORT
67
WORKDIR /app
78
COPY package.json .
89
COPY yarn.lock .
910
RUN yarn install --frozen-lockfile
10-
ENV NEXT_PUBLIC_USER_SVC_PORT=$USER_SVC_PORT \
11+
ENV NEXT_PUBLIC_BASE_URI=$BASE_URI \
12+
NEXT_PUBLIC_USER_SVC_PORT=$USER_SVC_PORT \
1113
NEXT_PUBLIC_QUESTION_SVC_PORT=$QUESTION_SVC_PORT \
1214
NEXT_PUBLIC_MATCHING_SVC_PORT=$MATCHING_SVC_PORT
1315

0 commit comments

Comments
 (0)