File size: 1,081 Bytes
65ea34a
 
 
 
 
 
 
 
 
 
 
e9b25f4
65ea34a
 
 
 
 
 
bfff792
65ea34a
 
 
 
 
bae6055
65ea34a
 
5e1f6ad
65ea34a
 
bfff792
 
65ea34a
 
 
bfff792
65ea34a
bfff792
65ea34a
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
# Use the official Node.js 16 image as the base image
FROM node:16
RUN chmod 1777 /tmp
# Install necessary dependencies for running Chrome
RUN apt-get update && apt-get install -y \
    wget \
    gnupg \
    ca-certificates \
    apt-transport-https \
    xvfb \
    && rm -rf /var/lib/apt/lists/*

# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
    && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
    && apt-get update \
    && apt-get install -y google-chrome-stable \
    && rm -rf /var/lib/apt/lists/*

# Set up the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
RUN ls ./

# Install Node.js dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Expose the port your app runs on
EXPOSE 8080
RUN export PASSWORD=$PASS && echo $B64JS | base64 -d > config.mjs

# Command to run the application

CMD [ "node", "index.mjs" ]