clone3 commited on
Commit
74d4fd2
·
verified ·
1 Parent(s): d823cdc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -3
Dockerfile CHANGED
@@ -1,6 +1,10 @@
1
  # Use Node.js 18 base image
2
  FROM node:18
3
 
 
 
 
 
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
@@ -10,8 +14,15 @@ RUN git clone https://github.com/ChrisCindy/node-web-console.git .
10
  # Install dependencies
11
  RUN npm install
12
 
 
 
 
 
 
 
13
  # Expose the port the app runs on
14
- EXPOSE 7860
15
 
16
- # Start the application
17
- CMD ["npm", "start"]
 
 
1
  # Use Node.js 18 base image
2
  FROM node:18
3
 
4
+ # Set environment variables for user and password
5
+ ENV USER=myuser
6
+ ENV PASSWORD=mypassword
7
+
8
  # Set the working directory inside the container
9
  WORKDIR /app
10
 
 
14
  # Install dependencies
15
  RUN npm install
16
 
17
+ # Copy entrypoint script
18
+ COPY docker-entrypoint.sh /usr/local/bin/
19
+
20
+ # Make the script executable
21
+ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
22
+
23
  # Expose the port the app runs on
24
+ EXPOSE 3000
25
 
26
+ # Run the entrypoint script and start the web server in production mode
27
+ ENTRYPOINT ["docker-entrypoint.sh"]
28
+ CMD ["npm", "run", "prod"]