ken4 commited on
Commit
f9dbcd7
·
verified ·
1 Parent(s): 2ad17d6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -4
Dockerfile CHANGED
@@ -4,15 +4,24 @@ ARG CACHEBUST=1
4
 
5
  WORKDIR /app
6
 
 
7
  RUN --mount=type=secret,id=GITHUB_REPO,required=true \
8
  git clone $(cat /run/secrets/GITHUB_REPO) /app
9
 
10
- RUN npm install && npm run build
 
11
 
12
- RUN chown -R node:node /app
 
 
 
 
13
 
14
- USER node
 
15
 
 
16
  EXPOSE 7860
17
 
18
- CMD ["npm", "start"]
 
 
4
 
5
  WORKDIR /app
6
 
7
+ # Clone repo privat
8
  RUN --mount=type=secret,id=GITHUB_REPO,required=true \
9
  git clone $(cat /run/secrets/GITHUB_REPO) /app
10
 
11
+ # Install dependencies untuk Express + tools lain
12
+ RUN npm install
13
 
14
+ # --- BUILD NUXT STATIC ---
15
+ WORKDIR /app/nuxt
16
+ RUN npm install
17
+ RUN npm run build
18
+ RUN npm run generate
19
 
20
+ # Kembali ke root project (Express)
21
+ WORKDIR /app
22
 
23
+ # Expose port Express
24
  EXPOSE 7860
25
 
26
+ # Jalankan Express server
27
+ CMD ["node", "app.js"]