-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
2 changed files
with
21 additions
and
14 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 |
---|---|---|
|
@@ -25,4 +25,5 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run test |
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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
FROM alpine | ||
FROM node:22-bookworm-slim | ||
|
||
RUN apk add --no-cache \ | ||
chromium \ | ||
nss \ | ||
freetype \ | ||
harfbuzz \ | ||
ca-certificates \ | ||
ttf-freefont \ | ||
nodejs \ | ||
npm | ||
|
||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium | ||
ENV HTML2PDF_NO_SANDBOX=true | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y wget gnupg && \ | ||
apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ | ||
libgtk2.0-0 libnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libgbm1 libasound2 && \ | ||
apt-get install -y chromium && \ | ||
apt-get clean | ||
|
||
WORKDIR /app | ||
COPY ["package.json", "./"] | ||
EXPOSE 3000 | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
RUN npm install | ||
|
||
COPY . . | ||
CMD ["npm", "start"] | ||
RUN npm run clean | ||
RUN npm run build | ||
|
||
CMD ["npm", "run", "start"] |