GPTfree api commited on
Commit
d9f0914
·
verified ·
1 Parent(s): 2cd83eb

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python image as a base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install git
8
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Clone the repository
11
+ RUN git clone https://github.com/Lightmoll/MigaduTrashmail.git .
12
+
13
+ # Create a virtual environment
14
+ RUN python3 -m venv venv
15
+
16
+ # Activate virtual environment and install requirements
17
+ RUN . venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt
18
+
19
+ # Copy default_config.py to config.py
20
+ RUN cp default_config.py config.py
21
+
22
+ # Expose any necessary ports (if applicable, assuming 8000 as default)
23
+ EXPOSE 8000
24
+
25
+ # Set the command to run the application
26
+ CMD ["/bin/bash", "-c", ". venv/bin/activate && python3 server.py"]