forked from catcatio/fb-event-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (40 loc) · 1.16 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
44
45
46
47
48
49
FROM keymetrics/pm2:8-alpine
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV NPM_CONFIG_LOGLEVEL warn
# Installs latest Chromium (68) package.
ENV CHROME_BIN=/usr/bin/chromium-browser
RUN apk update && \
apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
apk add --no-cache \
chromium@edge=~73.0.3683.103 \
nss@edge \
freetype@edge \
freetype-dev@edge \
harfbuzz@edge \
ttf-freefont@edge \
# other dependencies
git \
binutils-gold \
curl \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Install PM2
RUN pm2 install typescript \
&& pm2 install pm2-logrotate \
&& pm2 set pm2-logrotate:max_size 10M \
&& pm2 set pm2-logrotate:compress true \
&& pm2 set pm2-logrotate:rotateInterval '0 0 * * * *'
RUN mkdir -p /usr/app
WORKDIR /usr/app
VOLUME ["/usr/app"]
# ENTRYPOINT ["pm2-runtime", "start", "pm2.json"]