diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf8b794 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Python image (Linux) +FROM python:3.12-slim + +# Set a working directory +WORKDIR /app + +# Copy dependency list +COPY requirements.txt . + +# Install dependencies +RUN pip3 install -r requirements.txt + +# Copy the rest of the project +COPY . . + +# Expose port (whatever your backend runs on) +EXPOSE 8000 + +# Run exactly your command +CMD ["python", "-m", "uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] diff --git a/__pycache__/database.cpython-312.pyc b/__pycache__/database.cpython-312.pyc index 0234c73..ef06bc5 100644 Binary files a/__pycache__/database.cpython-312.pyc and b/__pycache__/database.cpython-312.pyc differ diff --git a/__pycache__/server.cpython-312.pyc b/__pycache__/server.cpython-312.pyc index fde6485..394e01b 100644 Binary files a/__pycache__/server.cpython-312.pyc and b/__pycache__/server.cpython-312.pyc differ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ad5c669 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.9" + +services: + backend: + build: + context: . + dockerfile: Dockerfile # Use Dockerfile.prod for production + ports: + - "8000:8000" + env_file: + - .env + environment: + DATABASE_URL: "{DATABASE_URL}" + volumes: + - .:/app # sync code for hot reload