Browse Source

Replace serve package with gatsby's default serve script

Kendall Whitman 6 months ago
parent
commit
322559ee0d
2 changed files with 3 additions and 4 deletions
  1. 2 3
      Dockerfile
  2. 1 1
      package.json

+ 2 - 3
Dockerfile

@@ -1,8 +1,7 @@
 FROM node
 WORKDIR portfolio
 COPY . .
-RUN npm i --loglevel verbose
-RUN npm i -g serve
+RUN npm i
 RUN npm run build
 EXPOSE 8001
-CMD serve -s public -l 8001
+CMD npm run serve

+ 1 - 1
package.json

@@ -22,7 +22,7 @@
     "develop": "gatsby develop",
     "format": "prettier --write src/**/*.{js,jsx}",
     "start": "npm run develop",
-    "serve": "gatsby serve",
+    "serve": "gatsby serve -H 0.0.0.0 -p 8001",
     "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
   }
 }