ColamanAI commited on
Commit
ee4731f
·
verified ·
1 Parent(s): 6f7755b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -12,9 +12,13 @@ RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
12
 
13
  FROM node:lts-alpine
14
 
15
- COPY --from=BUILD_IMAGE /app/package.json /app/package.json
16
- COPY --from=BUILD_IMAGE /app/dist /app/dist
17
- COPY --from=BUILD_IMAGE /app/public /app/public
 
 
 
 
18
 
19
  # Install production dependencies
20
  RUN yarn install --production --registry https://registry.npmmirror.com/
@@ -22,11 +26,8 @@ RUN yarn install --production --registry https://registry.npmmirror.com/
22
  # Create the log directory and grant write permissions
23
  RUN mkdir -p /app/logs && chmod 777 /app/logs
24
 
25
- # Specify port environment variable
26
- ENV PORT 7860
27
-
28
- # Expose port
29
- EXPOSE $PORT
30
 
31
- # Specify the command to be executed when the container starts
32
- CMD ["node", "dist/index.js", "--port", "7860"]
 
12
 
13
  FROM node:lts-alpine
14
 
15
+
16
+ # Copy the built files and required directories
17
+ COPY --from=build /app/configs /app/configs
18
+ COPY --from=build /app/package.json /app/package.json
19
+ COPY --from=build /app/dist /app/dist
20
+ COPY --from=build /app/public /app/public
21
+ COPY --from=build /app/node_modules /app/node_modules
22
 
23
  # Install production dependencies
24
  RUN yarn install --production --registry https://registry.npmmirror.com/
 
26
  # Create the log directory and grant write permissions
27
  RUN mkdir -p /app/logs && chmod 777 /app/logs
28
 
29
+ # Expose the port your app runs on
30
+ EXPOSE 8000
 
 
 
31
 
32
+ # Command to run your app using npm
33
+ CMD ["npm", "start"]