-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
795e075
commit 04e4080
Showing
1 changed file
with
17 additions
and
11 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 |
---|---|---|
|
@@ -4,29 +4,35 @@ FROM node:14.17.0-alpine as build-stage | |
# set working directory | ||
WORKDIR /case-flow-web/app | ||
|
||
ARG NODE_ENV | ||
ARG REACT_APP_KEYCLOAK_CLIENT | ||
ARG REACT_APP_KEYCLOAK_URL_REALM | ||
ARG REACT_APP_KEYCLOAK_URL | ||
|
||
ENV NODE_ENV ${NODE_ENV} | ||
ENV REACT_APP_API_SERVER_URL ${REACT_APP_API_SERVER_URL} | ||
ENV REACT_APP_KEYCLOAK_CLIENT ${REACT_APP_KEYCLOAK_CLIENT} | ||
ENV REACT_APP_KEYCLOAK_URL_REALM ${REACT_APP_KEYCLOAK_URL_REALM} | ||
ENV REACT_APP_KEYCLOAK_URL ${REACT_APP_KEYCLOAK_URL} | ||
|
||
|
||
# add `/app/node_modules/.bin` to $PATH | ||
ENV PATH /case-flow-web/app/node_modules/.bin:$PATH | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash git openssh | ||
|
||
# install and cache app dependencies | ||
|
||
COPY package-lock.json /case-flow-web/app/package-lock.json | ||
COPY package.json /case-flow-web/app/package.json | ||
|
||
RUN npm install --unsafe-perm --dev | ||
RUN npm install --unsafe-perm --production | ||
#RUN npm install [email protected] -g --silent | ||
|
||
COPY . /case-flow-web/app/ | ||
|
||
RUN npm run build | ||
|
||
FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nginx-122 AS deployer | ||
|
||
USER default | ||
|
||
FROM nginx:latest as production-stage | ||
RUN mkdir /app | ||
COPY --from=build-stage /case-flow-web/app/build /usr/share/nginx/html | ||
|
||
#COPY ./nginx_conf/nginx.conf /etc/nginx/nginx.conf | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
COPY ./nginx_conf/nginx.conf /etc/nginx/nginx.conf |