forked from wildsurfer/prerender
-
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
1 parent
50cd850
commit bbe0798
Showing
3 changed files
with
25 additions
and
20 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 |
---|---|---|
@@ -1,20 +1,23 @@ | ||
FROM node:latest | ||
LABEL maintainer="Freeletics GmbH <operations@freeletics.com>" | ||
|
||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y libdrm2 libgbm1 libu2f-udev \ | ||
&& apt-get install google-chrome-stable -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /tmp/* /var/lib/apt/lists/* | ||
|
||
WORKDIR /home/chrome | ||
COPY . /home/chrome | ||
RUN npm install | ||
RUN npm install prerender-memory-cache --save | ||
FROM node:18-alpine | ||
|
||
RUN apk update | ||
RUN apk add --update-cache curl wget nano chromium | ||
|
||
ENV CACHE_MAXSIZE=1000 | ||
ENV CACHE_TTL=6000 | ||
|
||
ENV CHROME_BIN=/usr/bin/chromium-browser | ||
ENV CHROME_PATH=/usr/lib/chromium/ | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "node", "server.js" ] | ||
USER node | ||
WORKDIR "/home/node" | ||
|
||
COPY ./package.json . | ||
COPY ./server.js . | ||
|
||
RUN npm install --no-package-lock | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["node", "server.js"] |
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
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