ken4 commited on
Commit
45fea1a
·
verified ·
1 Parent(s): 3e6b0a7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -4,24 +4,20 @@ ARG CACHEBUST=1
4
 
5
  WORKDIR /app
6
 
7
- # clone repo
8
  RUN --mount=type=secret,id=GITHUB_REPO,required=true \
9
  git clone $(cat /run/secrets/GITHUB_REPO) /app
10
 
11
- # install deps untuk root project
12
  RUN npm install
13
 
14
- # install Nuxt deps
15
- RUN cd nuxt && npm install
16
 
17
- # build Nuxt
18
- RUN cd nuxt && npx nuxi build
19
-
20
- # perizinan
21
  RUN chown -R node:node /app
22
  USER node
23
 
24
  EXPOSE 7860
25
 
26
- # start server (wrapper.js / index.js)
27
- 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 root project
12
  RUN npm install
13
 
14
+ # Build Nuxt (pakai yarn di folder nuxt)
15
+ RUN cd nuxt && yarn install --ignore-engines && yarn generate
16
 
17
+ # Setizinan supaya user node bisa jalanin app
 
 
 
18
  RUN chown -R node:node /app
19
  USER node
20
 
21
  EXPOSE 7860
22
 
23
+ CMD ["npm", "start"]