From bd3ac65a33c98f2193ce8a09e0993753c80beca7 Mon Sep 17 00:00:00 2001 From: CGajul Date: Fri, 21 Jun 2024 10:25:39 +0530 Subject: [PATCH] code push --- Dockerfile | 20 ++++++++++++++++++++ docker-compose.yaml | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ffea999 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use the official Python image from the Docker Hub +FROM python:3.9 + +# Set the working directory +WORKDIR /app + +# Copy the requirements file to the working directory +COPY requirements.txt . + +# Install dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the rest of the application code to the working directory +COPY . . + +# Expose port 80 +EXPOSE 80 + +# Run the FastAPI application +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..57f4f97 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +version: '3.8' + +services: + app: + build: . + ports: + - "8080:80" + volumes: + - .:/app + environment: + - PYTHONUNBUFFERED=1