From 528fcd822f877b4be863b2c1680ef44d98d0ee7f Mon Sep 17 00:00:00 2001 From: upayanmazumder Date: Thu, 28 Nov 2024 21:26:52 +0530 Subject: [PATCH] fix --- Dockerfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cdeeb77..61fc37a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,20 @@ -FROM python:3.10-slim +# Use the official Python image +FROM python:3.11 +# Create and change to the app directory WORKDIR /app +COPY api/requirements.txt ./api/ -COPY ./api . - +# Install dependencies for the api folder +WORKDIR /app/api RUN pip install --no-cache-dir -r requirements.txt +# Copy the local code to the container image +WORKDIR /app +COPY . . + +# Expose port 3000 EXPOSE 3000 -CMD ["python", "main.py"] \ No newline at end of file +# Run the web service on container startup +CMD ["gunicorn", "-c", "api/gunicorn_config.py", "api.main:app"] \ No newline at end of file