fix: add Dockerfile, starter

This commit is contained in:
Leifer Mendez
2023-01-08 16:47:28 +01:00
parent 5e6077dd8f
commit 4e0d33c6bb
32 changed files with 1164 additions and 164 deletions

View File

@@ -1,7 +1,24 @@
FROM node:lts-bullseye as bot
FROM node:18-alpine as node
WORKDIR /app
COPY package*.json ./
RUN npm i
# Installs latest Chromium (92) package.
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# Puppeteer v10.0.0 works with Chromium 92.
COPY . .
ARG PORT
RUN npm install puppeteer@10.0.0
RUN npm install
CMD ["npm", "start"]