| FROM node:20-slim |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| handbrake-cli \ |
| wget \ |
| fontconfig \ |
| fonts-noto \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| 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 |
|
|
| |
| 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 . . |
|
|
| |
| 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"] |