Elalimy commited on
Commit
811f85a
·
verified ·
1 Parent(s): 8625430

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python image from the Docker Hub
2
+ FROM python:3.9-slim
3
+
4
+ # Set environment variables
5
+ ENV FLASK_APP=app.py
6
+ ENV FLASK_RUN_HOST=0.0.0.0
7
+ ENV FLASK_RUN_PORT=80
8
+
9
+ # Install ffmpeg
10
+ RUN apt-get update && \
11
+ apt-get install -y ffmpeg && \
12
+ apt-get clean && \
13
+ rm -rf /var/lib/apt/lists/*
14
+
15
+ # Set the working directory
16
+ WORKDIR /app
17
+
18
+ # Copy the application files to the container
19
+ COPY . /app
20
+
21
+ # Install dependencies
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Expose the port on which the app will run
25
+ EXPOSE 80
26
+
27
+ # Run the Flask app with Gunicorn
28
+ CMD ["gunicorn", "-b", "0.0.0.0:80", "app:app"]