maylinejix commited on
Commit
ed98fea
·
verified ·
1 Parent(s): 623f1d8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +51 -0
Dockerfile ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-slim
2
+
3
+ # Install dependencies untuk Puppeteer
4
+ RUN apt-get update && apt-get install -y \
5
+ wget \
6
+ gnupg \
7
+ ca-certificates \
8
+ fonts-liberation \
9
+ libasound2 \
10
+ libatk-bridge2.0-0 \
11
+ libatk1.0-0 \
12
+ libatspi2.0-0 \
13
+ libcups2 \
14
+ libdbus-1-3 \
15
+ libdrm2 \
16
+ libgbm1 \
17
+ libgtk-3-0 \
18
+ libnspr4 \
19
+ libnss3 \
20
+ libwayland-client0 \
21
+ libxcomposite1 \
22
+ libxdamage1 \
23
+ libxfixes3 \
24
+ libxkbcommon0 \
25
+ libxrandr2 \
26
+ xdg-utils \
27
+ libu2f-udev \
28
+ libvulkan1 \
29
+ && rm -rf /var/lib/apt/lists/*
30
+
31
+ # Set working directory
32
+ WORKDIR /app
33
+
34
+ # Copy package files
35
+ COPY package*.json ./
36
+
37
+ # Install npm dependencies
38
+ RUN npm install
39
+
40
+ # Copy aplikasi
41
+ COPY . .
42
+
43
+ # Expose port
44
+ EXPOSE 7860
45
+
46
+ # Set environment variables
47
+ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=false
48
+ ENV NODE_ENV=production
49
+
50
+ # Run aplikasi
51
+ CMD ["node", "server.js"]