added docker and modify the file so it work

This commit is contained in:
Rainy21
2026-03-19 02:36:53 -04:00
parent 85ff2f5c72
commit 972247ee5b
9 changed files with 71 additions and 9 deletions
+20
View File
@@ -0,0 +1,20 @@
FROM python:3.11-slim
# Set the working directory
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Ensure the database directory exists for SQLite persistence
RUN mkdir -p /app/db
# Expose the application port
EXPOSE 8000
# Command to start the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]