AIMaster7 commited on
Commit
bfd5a3c
·
verified ·
1 Parent(s): c783949

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -5
Dockerfile CHANGED
@@ -1,11 +1,27 @@
1
- FROM node:18-alpine
 
2
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
- COPY package*.json ./
6
- RUN npm install
 
 
 
7
 
8
- COPY . .
 
9
 
 
 
 
 
10
  EXPOSE 3000
11
- CMD ["npm", "start"]
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.11-slim
3
 
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set the working directory in the container
9
  WORKDIR /app
10
 
11
+ # Install system dependencies (if any)
12
+ # RUN apt-get update && apt-get install -y <dependencies>
13
+
14
+ # Copy requirements.txt first to leverage Docker cache
15
+ COPY requirements.txt .
16
 
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copy the application code
21
+ COPY app/ /app/
22
+
23
+ # Expose the port FastAPI is running on
24
  EXPOSE 3000
25
+
26
+ # Command to run the application
27
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "3000"]