Parcourir la source

Merge pull request #67 from Daethyra/main

Fix for Issue #66 | Docker run fails due to "Cannot find module '/home/myuser/dist/main.js'" | Error in Docker container
Steve Sewell il y a 1 an
Parent
commit
82b70f2356
3 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 3 0
      .dockerignore
  2. 1 2
      Dockerfile
  3. 1 1
      package.json

+ 3 - 0
.dockerignore

@@ -8,3 +8,6 @@ storage
 
 # installed files
 node_modules
+
+# ignore base image 'main.js'
+main.js

+ 1 - 2
Dockerfile

@@ -45,7 +45,6 @@ RUN npm --quiet set progress=false \
 # for most source file changes.
 COPY --chown=myuser . ./
 
-
 # Run the image. If you know you won't need headful browsers,
 # you can remove the XVFB start script for a micro perf gain.
-CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod --silent
+CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod --silent

+ 1 - 1
package.json

@@ -32,7 +32,7 @@
     "start": "npm run start:dev",
     "start:cli": "cross-env NODE_ENV=development npm run build && node dist/src/cli.js",
     "start:dev": "cross-env NODE_ENV=development npm run build && node dist/src/main.js",
-    "start:prod": "node dist/main.js",
+    "start:prod": "node dist/src/main.js",
     "build": "tsc",
     "fmt": "prettier --write ."
   },