Update Dockerfile
Browse files- Dockerfile +8 -9
Dockerfile
CHANGED
@@ -1,21 +1,20 @@
|
|
1 |
-
# Use official Python image
|
2 |
-
FROM python:3.
|
3 |
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
#
|
8 |
-
RUN apt-get update && apt-get install -y gcc libffi-dev libpq-dev && rm -rf /var/lib/apt/lists/*
|
9 |
-
|
10 |
-
# Install Python dependencies
|
11 |
COPY requirements.txt .
|
|
|
|
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
-
# Copy
|
15 |
COPY . .
|
16 |
|
17 |
# Expose the port your app runs on
|
18 |
EXPOSE 5000
|
19 |
|
20 |
-
# Run the
|
21 |
-
CMD ["python", "
|
|
|
1 |
+
# Use official Python base image
|
2 |
+
FROM python:3.11-slim
|
3 |
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy requirements file (you need to create this)
|
|
|
|
|
|
|
8 |
COPY requirements.txt .
|
9 |
+
|
10 |
+
# Install dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Copy application code
|
14 |
COPY . .
|
15 |
|
16 |
# Expose the port your app runs on
|
17 |
EXPOSE 5000
|
18 |
|
19 |
+
# Run the server with eventlet
|
20 |
+
CMD ["python", "server.py"]
|