Ruloaooa commited on
Commit
23c1bc8
·
verified ·
1 Parent(s): 7c0edda

Create DockerFile

Browse files
Files changed (1) hide show
  1. DockerFile +20 -0
DockerFile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gunakan base image Node.js
2
+ FROM node:18
3
+
4
+ # Atur direktori kerja dalam container
5
+ WORKDIR /app
6
+
7
+ # Salin file package.json dan package-lock.json (jika ada)
8
+ COPY package*.json ./
9
+
10
+ # Install dependensi
11
+ RUN npm install
12
+
13
+ # Salin seluruh kode proyek ke dalam container
14
+ COPY . .
15
+
16
+ # Expose port yang digunakan Express.js
17
+ EXPOSE 3000
18
+
19
+ # Jalankan aplikasi
20
+ CMD ["node", "index.js"]