jbilcke-hf HF staff commited on
Commit
62ec899
1 Parent(s): 140b8e6

fix for the next standalone build

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. package.json +2 -1
Dockerfile CHANGED
@@ -48,7 +48,7 @@ RUN ffmpeg -version
48
  # Copy the current directory contents into the container at /app setting the owner to the user
49
  COPY --chown=user . /app
50
 
51
- RUN npm ci --force
52
 
53
  RUN npm run build:ci
54
 
@@ -56,4 +56,4 @@ EXPOSE 3000
56
 
57
  ENV PORT 3000
58
 
59
- CMD ["npm", "run", "start"]
 
48
  # Copy the current directory contents into the container at /app setting the owner to the user
49
  COPY --chown=user . /app
50
 
51
+ RUN npm ci
52
 
53
  RUN npm run build:ci
54
 
 
56
 
57
  ENV PORT 3000
58
 
59
+ CMD ["npm", "run", "start:prod"]
package.json CHANGED
@@ -9,8 +9,9 @@
9
  "dev": "npm i && npm run checks && next dev",
10
  "build": "npm i && npm run checks && next build && npm run build:copyassets",
11
  "build:copyassets": "cp -R public .next/standalone/public && cp -R .next/static .next/standalone/.next/static",
12
- "build:ci": "next build",
13
  "start": "next start",
 
14
  "checks": "npm run format:fix && npm run lint",
15
  "format": "prettier --check --ignore-path .gitignore ./src/",
16
  "format:fix": "prettier --write --ignore-path .gitignore ./src/",
 
9
  "dev": "npm i && npm run checks && next dev",
10
  "build": "npm i && npm run checks && next build && npm run build:copyassets",
11
  "build:copyassets": "cp -R public .next/standalone/public && cp -R .next/static .next/standalone/.next/static",
12
+ "build:ci": "next build @@ npm run build:copyassets",
13
  "start": "next start",
14
+ "start:prod": "node .next/standalone/server.js",
15
  "checks": "npm run format:fix && npm run lint",
16
  "format": "prettier --check --ignore-path .gitignore ./src/",
17
  "format:fix": "prettier --write --ignore-path .gitignore ./src/",