aqul commited on
Commit
e54a247
·
verified ·
1 Parent(s): b8a7659

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +45 -0
Dockerfile ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM mcr.microsoft.com/playwright:focal
2
+
3
+ # Skip Playwright browser downloads
4
+ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
5
+
6
+ # Set timezone
7
+ ENV TZ=Asia/Jakarta
8
+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
9
+
10
+ WORKDIR /app
11
+
12
+ # Clone repository
13
+ RUN git clone https://github.com/zennn08/brat-api .
14
+
15
+ # Install dependencies
16
+ RUN npm install
17
+
18
+ # Install Playwright dependencies and browsers
19
+ RUN npx playwright install --with-deps
20
+
21
+ # Install additional dependencies for fonts
22
+ RUN apt-get update && apt-get install -y \
23
+ wget \
24
+ fontconfig \
25
+ fonts-noto-color-emoji \
26
+ fontconfig \
27
+ --no-install-recommends && \
28
+ rm -rf /var/lib/apt/lists/*
29
+
30
+ # Download and install AppleColorEmoji.ttf
31
+ RUN mkdir -p /usr/share/fonts/AppleColorEmoji && \
32
+ wget -O /usr/share/fonts/AppleColorEmoji/AppleColorEmoji.ttf \
33
+ https://github.com/samuelngs/apple-emoji-linux/releases/latest/download/AppleColorEmoji.ttf && \
34
+ fc-cache -f -v
35
+
36
+ RUN fc-list | grep -i "AppleColorEmoji"
37
+
38
+ # Set environment variable for the app port
39
+ ENV PORT=7860
40
+
41
+ # Expose the port
42
+ EXPOSE 7860
43
+
44
+ # Start the application
45
+ CMD ["node", "app.js"]