Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

2-5 [Fix] Frontend Dockerfile 수정 #112

Merged
merged 2 commits into from
Dec 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN --mount=type=secret,id=REACT_APP_BASE_URL export REACT_APP_BASE_URL=$(cat /run/secrets/REACT_APP_BASE_URL)
RUN npm run build

FROM nginx:alpine
WORKDIR /usr/share/nginx/statics
RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx.conf /etc/nginx/conf.d
RUN --mount=type=secret,id=REACT_APP_BASE_URL export REACT_APP_BASE_URL=$(cat /run/secrets/REACT_APP_BASE_URL)
COPY robots.txt .
COPY --from=builder /app/build .
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]