-
Notifications
You must be signed in to change notification settings - Fork 267
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 864 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 864 Bytes
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
# Gunakan base image Node.js versi 20 dengan Debian Bookworm
FROM node:20-bookworm
# Install dependency sistem yang dibutuhkan (ffmpeg untuk video, build tools untuk native module seperti sqlite3)
RUN apt-get update && apt-get install -y \
ffmpeg \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Set working directory di dalam container
WORKDIR /app
# Copy package.json dan package-lock.json
COPY package*.json ./
# Install dependency production, lalu rebuild sqlite3 dari source agar kompatibel
RUN npm install --omit=dev \
&& npm rebuild sqlite3 --build-from-source
# Copy seluruh source code
COPY . .
# Buat folder yang dibutuhkan (jika belum ada)
RUN mkdir -p db logs public/uploads/videos public/uploads/thumbnails
# Expose port (default 7575, bisa diubah via .env)
EXPOSE 7575
# Jalankan aplikasi
CMD ["npm", "start"]