From 62c9b75e8d08ed64b972130b474352e511a56f38 Mon Sep 17 00:00:00 2001 From: A R R R Associates Date: Sun, 21 Jun 2026 13:21:45 +0530 Subject: [PATCH] Add Dockerfile for Coolify deployment --- .dockerignore | 34 ++++++++++++++++++++++++++++++++++ Dockerfile | 25 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9a008ad --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +.git +.gitignore +__pycache__/ +*.pyc +*.pyo +*.pyd +.Python + +.env +.env.* +!.env.example + +venv/ +.venv/ +env/ + +*.db +*.sqlite +*.sqlite3 + +data/storage/ +data/year_backups/ +uploads/ +media/ +logs/ + +node_modules/ +playwright-report/ +test-results/ + +.DS_Store +Thumbs.db +.vscode/ +.idea/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f389406 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM python:3.12-slim + +WORKDIR /app + +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + libpq-dev \ + curl \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt . + +RUN pip install --no-cache-dir --upgrade pip \ + && pip install --no-cache-dir -r requirements.txt + +COPY . . + +RUN mkdir -p /app/data/storage /app/data/year_backups + +EXPOSE 8000 + +CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"] \ No newline at end of file