Niansuh commited on
Commit
849a7bc
1 Parent(s): 7818129

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,21 +1,17 @@
1
- # Use the official FastAPI image with Python 3.9
2
- FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements and install dependencies
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
10
-
11
- # Copy the application code
12
  COPY . .
13
 
14
- # Set environment variables
15
- ENV APP_SECRET=your_app_secret_here
16
 
17
- # Expose the port
18
  EXPOSE 8001
19
 
20
- # Run the application
21
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"]
 
1
+ # Use official Python image
2
+ FROM python:3.10-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Copy all project files
 
 
 
 
8
  COPY . .
9
 
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Expose the port for FastAPI
14
  EXPOSE 8001
15
 
16
+ # Command to run the FastAPI app with uvicorn
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"]