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