File size: 532 Bytes
4a692b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Gunakan node image resmi sebagai base image
FROM node:20-slim

# Tentukan direktori kerja di dalam kontainer
WORKDIR /app

# Salin package.json dan package-lock.json terlebih dahulu
COPY package*.json ./

# Install dependensi aplikasi
RUN npm install --production

# Salin seluruh sisa file source code ke dalam kontainer
COPY . .

# Set hak akses untuk folder kerja agar tidak terkendala isu permission di HF
RUN chmod -R 777 /app

# Port eksposur internal Hugging Face
EXPOSE 7860

# Jalankan server Express
CMD ["npm", "start"]