Niansuh commited on
Commit
110a507
1 Parent(s): 426a36e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -17
Dockerfile CHANGED
@@ -1,23 +1,20 @@
1
- # Use the Node.js 18 base image
2
- FROM node:18
3
 
4
- # Clone the ChatGPT repository from GitHub
5
- RUN git clone https://github.com/RKIAI/ChatGPT-Next-Web.git
6
 
7
- # Set the working directory inside the container
8
- WORKDIR "ChatGPT-Next-Web"
9
 
10
- # Install dependencies using npm
11
- RUN npm install
12
 
13
- # Build the project
14
- RUN npm run build
15
 
16
- # Define environment variables
17
- ENV CUSTOM_MODELS=-all,+gpt-3.5-turbo@NAI,+gpt-3.5-turbo-1106@NAI,+gpt-3.5-turbo-0125@NAI,+gpt-4-turbo-preview@NAI,+gpt-4-vision-preview@NAI,+gpt-4o@NAI,+gpt-4o-mini@NAI,+gpt-4o-2024-05-13@NAI,+gpt-4o-mini-2024-07-18@NAI,+Creative@NAI,+Balanced@NAI,+Precise@NAI
18
- # ,+llama-3.1-405b-reasoning@NAI (Not Available)
19
- # Expose port 3000 for accessing the application
20
- EXPOSE 3000
21
 
22
- # Specify the command to run the application
23
- CMD ["npm", "run", "start"]
 
1
+ # Use the official Python base image
2
+ FROM python:3.8-slim
3
 
4
+ # Set the working directory, subsequent commands will be executed in this directory
5
+ WORKDIR /app
6
 
7
+ # Copy all files in the current directory to the working directory
8
+ COPY . /app
9
 
10
+ # Install Flask library
11
+ RUN pip install Flask
12
 
13
+ # Tell Docker the port number to listen on when running the container
14
+ EXPOSE 5000
15
 
16
+ # Set environment variables to ensure Flask is running in production mode
17
+ ENV FLASK_ENV=development
 
 
 
18
 
19
+ # Set the startup command to run the Flask application
20
+ CMD ["flask", "run", "--host=0.0.0.0"]