Niansuh commited on
Commit
c6d261c
·
verified ·
1 Parent(s): 910f137

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies if needed (e.g., for MySQL client libraries)
6
+ RUN apt-get update && apt-get install -y gcc default-libmysqlclient-dev && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Copy and install dependencies
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy application code
13
+ COPY . .
14
+
15
+ # Expose port 8000 and run the application
16
+ EXPOSE 8000
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]