File size: 1,194 Bytes
a3a7572
 
 
 
 
 
 
 
 
 
 
 
827dc8b
a3a7572
 
 
 
 
827dc8b
 
 
 
a3a7572
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827dc8b
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
FROM node:20-slim

# Install HandBrakeCLI and font dependencies
RUN apt-get update && apt-get install -y \
    handbrake-cli \
    wget \
    fontconfig \
    fonts-noto \
    && rm -rf /var/lib/apt/lists/*

# Install Noto Sans Sinhala font
RUN mkdir -p /usr/share/fonts/noto-sinhala \
    && wget -q "https://raw.githubusercontent.com/Super-Chama/Noto-Sans-Sinhala/refs/heads/master/TTF/NotoSansSinhala-Bold.ttf" \
       -O /usr/share/fonts/noto-sinhala/NotoSansSinhala.ttf \
    && fc-cache -fv

# Install Roboto font
RUN mkdir -p /usr/share/fonts/roboto \
    && wget -q "https://raw.githubusercontent.com/akurapluz/sinhala-fonts/refs/heads/main/Roboto-Regular.ttf" \
       -O /usr/share/fonts/roboto/Roboto-Regular.ttf \
    && wget -q "https://raw.githubusercontent.com/akurapluz/sinhala-fonts/refs/heads/main/Roboto-Bold.ttf" \
       -O /usr/share/fonts/roboto/Roboto-Bold.ttf \
    && fc-cache -fv

WORKDIR /app
COPY package*.json ./
RUN npm install --production

COPY . .

# HuggingFace Spaces runs as non-root user 1000
RUN mkdir -p /app/uploads /app/output \
    && chmod -R 777 /app/uploads /app/output

EXPOSE 7860
ENV PORT=7860
ENV NODE_ENV=production

CMD ["node", "server.js"]