-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat/#185 Dockerfile 생성
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Build stage | ||
FROM krmp-d2hub-idock.9rum.cc/goorm/node:18 as reactBuilder | ||
WORKDIR /workspace/project | ||
COPY . . | ||
RUN npm ci | ||
RUN npm install -g serve | ||
|
||
ENV REACT_APP_URI "https://k4b619f06d4c1a.user-app.krampoline.com/api" | ||
ENV REACT_APP_KAKAO_KEY "415e174a89b3ef7ce97cb74dabe90a4d" | ||
|
||
ENV NODE_OPTIONS "--max_old_space_size=4096" | ||
|
||
RUN npm run build | ||
|
||
EXPOSE 3000 | ||
CMD ["serve", "build"] | ||
|
||
# Build stage | ||
|
||
|
||
# Stage 2: Nginx Run | ||
FROM krmp-d2hub-idock.9rum.cc/goorm/nginx:latest as nginxBuilder | ||
|
||
WORKDIR /var/nginx/build | ||
|
||
COPY --from=reactBuilder /workspace/project/build/ . | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
|
||
|