-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
43 lines (37 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM node:20-alpine
# Install dependencies
RUN apk update && apk upgrade && \
apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
fontconfig \
ttf-dejavu \
ttf-droid \
ttf-freefont \
ttf-liberation \
ttf-inconsolata
# Set the environment variable to use the installed Chromium
ENV PUPPETEER_SKIP_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# Set working directory
WORKDIR /opt/app
# /opt/app is where the application code is stored
# /opt/input is where it will look for the resume.json file
# /opt/output is where it will save the generated files resume*.{png,html,pdf}
COPY ./.puppeteerrc.cjs /opt/app/.puppeteerrc.cjs
COPY ./index.js /opt/app/index.js
COPY ./package-lock.json /opt/app/package-lock.json
COPY ./package.json /opt/app/package.json
COPY ./theme /opt/app/theme
COPY ./resume.json /opt/input/resume.json
COPY ./resume-preview.json.png /opt/output/resume-preview.json.png
COPY ./resume-preview.pdf.png /opt/output/resume-preview.pdf.png
COPY ./resume.html /opt/output/resume.html
COPY ./resume.pdf /opt/output/resume.pdf
# Install app dependencies
RUN npm install
# Command to run your application
CMD ["npm", "run", "build"]