Update Dockerfile
Browse files- Dockerfile +2 -6
Dockerfile
CHANGED
@@ -9,10 +9,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
9 |
# Set the working directory in the container
|
10 |
WORKDIR /app
|
11 |
|
12 |
-
# Copy
|
13 |
COPY requirements.txt /app/
|
14 |
|
15 |
-
# Install
|
16 |
RUN pip install --no-cache-dir --upgrade pip
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
@@ -22,9 +22,5 @@ COPY . /app
|
|
22 |
# Expose the port that the FastAPI app runs on
|
23 |
EXPOSE 8001
|
24 |
|
25 |
-
# Environment variables (set your actual APP_SECRET securely)
|
26 |
-
# It's recommended to pass APP_SECRET at runtime rather than hardcoding it
|
27 |
-
# ENV APP_SECRET=your_app_secret_here
|
28 |
-
|
29 |
# Command to run the app with Gunicorn and Uvicorn workers
|
30 |
CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "--workers", "4", "--bind", "0.0.0.0:8001", "main:app"]
|
|
|
9 |
# Set the working directory in the container
|
10 |
WORKDIR /app
|
11 |
|
12 |
+
# Copy the requirements file first
|
13 |
COPY requirements.txt /app/
|
14 |
|
15 |
+
# Install dependencies
|
16 |
RUN pip install --no-cache-dir --upgrade pip
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
|
|
22 |
# Expose the port that the FastAPI app runs on
|
23 |
EXPOSE 8001
|
24 |
|
|
|
|
|
|
|
|
|
25 |
# Command to run the app with Gunicorn and Uvicorn workers
|
26 |
CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "--workers", "4", "--bind", "0.0.0.0:8001", "main:app"]
|