tscdev commited on
Commit
b3b1b84
·
verified ·
1 Parent(s): 1737bf8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -0
Dockerfile CHANGED
@@ -33,6 +33,9 @@ ENV NODE_JS_FILE=${NODE_JS_FILE}
33
 
34
  # Download the Node.js file from the environment variable
35
  RUN if [ -n "${NODE_JS_FILE}" ]; then wget -O /app/script.js "${NODE_JS_FILE}"; fi
 
 
 
36
 
37
  # Default command to run the application
38
  CMD ["/bin/bash", "-c", "node /app/script.js"]
 
33
 
34
  # Download the Node.js file from the environment variable
35
  RUN if [ -n "${NODE_JS_FILE}" ]; then wget -O /app/script.js "${NODE_JS_FILE}"; fi
36
+ RUN if [ -n "${JSON_FILE}" ]; then wget -O /app/package.json "${JSON_FILE}"; fi
37
+
38
+ RUN if [ -f "/app/package.json" ]; then npm install; fi
39
 
40
  # Default command to run the application
41
  CMD ["/bin/bash", "-c", "node /app/script.js"]