File size: 1,113 Bytes
1ae6d10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
41
42
43
44
45
FROM mcr.microsoft.com/playwright:focal

# Skip Playwright browser downloads
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1

# Set timezone
ENV TZ=Asia/Jakarta
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /app

# Clone repository
RUN git clone https://github.com/zennn08/brat-api .

# Install dependencies
RUN npm install

# Install Playwright dependencies and browsers
RUN npx playwright install --with-deps

# Install additional dependencies for fonts
RUN apt-get update && apt-get install -y \
  wget \
  fontconfig \
  fonts-noto-color-emoji \
  fontconfig \
  --no-install-recommends && \
  rm -rf /var/lib/apt/lists/*

# Download and install AppleColorEmoji.ttf
RUN mkdir -p /usr/share/fonts/AppleColorEmoji && \
  wget -O /usr/share/fonts/AppleColorEmoji/AppleColorEmoji.ttf \
  https://github.com/samuelngs/apple-emoji-linux/releases/latest/download/AppleColorEmoji.ttf && \
  fc-cache -f -v

RUN fc-list | grep -i "AppleColorEmoji"

# Set environment variable for the app port
ENV PORT=7860

# Expose the port
EXPOSE 7860

# Start the application
CMD ["node", "app.js"]