Skip to content

Commit 9bb1104

Browse files
committed
Hotfix: Web CD workflow
1 parent 8e21a71 commit 9bb1104

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/engagement-web-cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
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 }} \

web/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ ENV REACT_APP_BUILD_DATE=${REACT_APP_BUILD_DATE}
1414
ENV REACT_APP_BUILD_BRANCH=${REACT_APP_BUILD_BRANCH}
1515
ENV 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
2424
COPY package.json ./
2525
COPY package-lock.json ./
2626
COPY .npmrc ./
27+
COPY --from=common_hosted_form_service /components /app/common-hosted-form-service/components
2728

2829
RUN --mount=type=secret,id=artifactory_password \
2930
--mount=type=secret,id=artifactory_username \
@@ -51,7 +52,7 @@ RUN mkdir /app
5152
ARG user=nginx
5253
RUN 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
5556
COPY /nginx/*.conf /etc/nginx/
5657
COPY /nginx/docker-entrypoint.sh /
5758
COPY /nginx/config.js.template /usr/share/nginx/html/config.js.template

0 commit comments

Comments
 (0)