Skip to content

Commit a3abc3e

Browse files
committed
build(frontend): Fix frontend Dockerfile
1 parent 6fe9958 commit a3abc3e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

frontend/build/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ COPY package*.json ./
44
EXPOSE 80
55

66
FROM base as builder
7+
8+
ARG NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
9+
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
10+
711
WORKDIR /app
12+
813
COPY . .
14+
915
RUN npm ci && npm run build
1016

1117
FROM base as production
1218

13-
ARG NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
14-
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
15-
1619
WORKDIR /app
1720

18-
ENV NODE_ENV=production
19-
2021
RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001
2122
USER nextjs
2223

0 commit comments

Comments
 (0)