-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (27 loc) · 1.01 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
FROM node:20
WORKDIR /app
# Install bun
RUN curl -fsSL https://bun.sh/install | bash
# Add bun to PATH
ENV PATH="/root/.bun/bin:${PATH}"
# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Install Google Chrome Stable and fonts
# Note: this installs the necessary libs to make the browser work with Puppeteer.
RUN apt-get update && apt-get install curl gnupg -y \
&& curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install google-chrome-stable -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Install nginx
RUN apt-get update && apt-get install nginx -y
COPY package*.json .
RUN npm install
RUN npm install pm2 -g
COPY . .
# Copy nginx config
COPY ./nginx/nginx.conf /etc/nginx
# Copy certificates
COPY ./certificate /etc/nginx/ssl
CMD ["sh", "./start.sh"]