Skip to content

Commit

Permalink
Merge pull request #394 from bcgov/pdf-generation-docker
Browse files Browse the repository at this point in the history
updates to node.js to include chrome
  • Loading branch information
SoLetsDev authored Aug 2, 2023
2 parents c0b595c + 7d0acf6 commit 2f3cc4e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM artifacts.developer.gov.bc.ca/docker-remote/node:lts-alpine3.13

RUN mkdir -p /logs
RUN chmod 755 /logs
RUN mkdir -p /logs \
&& chmod 755 /logs

WORKDIR /opt/app-root/src
RUN ln -s /logs .
Expand All @@ -10,5 +10,15 @@ COPY package*.json ./
RUN npm ci

COPY . /opt/app-root/src

# Installs latest Chromium package.
RUN apk upgrade --no-cache --available \
&& apk add --no-cache dbus chromium chromium-chromedriver

ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/

ENV CHROMIUM_FLAGS="--disable-software-rasterizer --disable-dev-shm-usage --no-sandbox --disable-gpu"

EXPOSE 443 8080
CMD ["npm", "start"]

0 comments on commit 2f3cc4e

Please sign in to comment.