File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 run : |
7575 export TZ='America/Vancouver' &&
7676 docker build . --file Dockerfile \
77+ --build-context common_hosted_form_service=../common-hosted-form-service \
7778 --secret id=artifactory_username,src=/tmp/artifactory_username \
7879 --secret id=artifactory_password,src=/tmp/artifactory_password \
7980 --build-arg REACT_APP_BUILD_COMMIT_HASH=${{ github.sha }} \
Original file line number Diff line number Diff line change @@ -14,16 +14,17 @@ ENV REACT_APP_BUILD_DATE=${REACT_APP_BUILD_DATE}
1414ENV REACT_APP_BUILD_BRANCH=${REACT_APP_BUILD_BRANCH}
1515ENV REACT_APP_GITHUB_REPO=${REACT_APP_GITHUB_REPO}
1616
17- # set working directory
18- WORKDIR /app
17+ # set working directory to preserve the repo-relative local dependency path
18+ WORKDIR /app/web
1919
20- # add `/ app/node_modules/.bin` to $PATH
21- ENV PATH=/app/node_modules/.bin:$PATH
20+ # add the web app binaries to $PATH
21+ ENV PATH=/app/web/ node_modules/.bin:$PATH
2222
2323# install app dependencies using BuildKit secrets for Artifactory credentials
2424COPY package.json ./
2525COPY package-lock.json ./
2626COPY .npmrc ./
27+ COPY --from=common_hosted_form_service /components /app/common-hosted-form-service/components
2728
2829RUN --mount=type=secret,id=artifactory_password \
2930 --mount=type=secret,id=artifactory_username \
@@ -51,7 +52,7 @@ RUN mkdir /app
5152ARG user=nginx
5253RUN usermod -a -G root $user
5354
54- COPY --from=build-stage /app/build /usr/share/nginx/html
55+ COPY --from=build-stage /app/web/ build /usr/share/nginx/html
5556COPY /nginx/*.conf /etc/nginx/
5657COPY /nginx/docker-entrypoint.sh /
5758COPY /nginx/config.js.template /usr/share/nginx/html/config.js.template
You can’t perform that action at this time.
0 commit comments