Skip to content

Commit 58c645f

Browse files
committed
fix: define env early enough
1 parent e895b61 commit 58c645f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

apps/web/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
FROM node:20-alpine AS base
2-
3-
42
FROM base AS deps
53

64
RUN apk add --no-cache libc6-compat
@@ -17,6 +15,10 @@ COPY --from=deps /app/node_modules ./node_modules
1715
COPY . .
1816

1917

18+
19+
ARG NEXT_PUBLIC_API_URL
20+
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
21+
2022
RUN npm run build
2123

2224

@@ -43,7 +45,6 @@ EXPOSE 3001
4345

4446
ENV PORT=3001
4547
ENV HOSTNAME=0.0.0.0
46-
ARG NEXT_PUBLIC_API_URL
47-
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
48+
4849

4950
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)