diff --git a/.dockerignore b/.dockerignore index 93b3bd4..c66fc05 100644 --- a/.dockerignore +++ b/.dockerignore @@ -27,4 +27,6 @@ client_secret.json .firebaserc -firebase.json \ No newline at end of file +firebase.json + +cloud \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 3d81682..53ac269 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,19 @@ -# Use the official Python image as the base image -FROM python:3.11.5 +FROM python:3.11.5-slim # Set the working directory inside the container WORKDIR /app -# Copy the requirements.txt file into the container at /app -COPY requirements.txt /app/ +# Copy the requirements file to the working directory +COPY requirements.txt . -# Install any dependencies specified in requirements.txt -RUN pip install -r requirements.txt +# Install dependencies +RUN pip install --no-cache-dir -r requirements.txt -# Copy the current directory contents into the container at /app -COPY . /app/ +# Copy the rest of the application code to the working directory +COPY . . -# Expose the port that FastAPI will run on -EXPOSE 3100 +# Expose the port that the application will run on +EXPOSE 8000 -# Command to run the FastAPI application -CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "-b", ":3100", "app.main:app"] +# Command to run the application using Uvicorn +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file