diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5099520 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +__pycache__/ +*.py[cod] +*.sqlite3 +.env +.venv/ +venv/ +.git/ +.github/ +.gitignore +.DS_Store +data/users.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..42199ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Dockerfile for docker-fastapi-test +FROM python:3.11-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +WORKDIR /app + +# Install system deps only if needed for building packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + && rm -rf /var/lib/apt/lists/* + +# Install Python deps +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +# Copy application +COPY . . + +# Ensure data dir exists +RUN mkdir -p /app/data + +EXPOSE 8000 +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..c37e199 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +version: "3.9" +services: + api: + build: . + container_name: fastapi_app + ports: + - "8000:8000" + # Persist users.json across container recreations + volumes: + - app_data:/app/data + restart: unless-stopped + +volumes: + app_data: diff --git a/screenshots/output1 (1).png b/screenshots/output1 (1).png new file mode 100644 index 0000000..4636712 Binary files /dev/null and b/screenshots/output1 (1).png differ diff --git a/screenshots/output1 (2).png b/screenshots/output1 (2).png new file mode 100644 index 0000000..ed29382 Binary files /dev/null and b/screenshots/output1 (2).png differ diff --git a/screenshots/output1 (3).png b/screenshots/output1 (3).png new file mode 100644 index 0000000..4e5e914 Binary files /dev/null and b/screenshots/output1 (3).png differ diff --git a/screenshots/output1 (4).png b/screenshots/output1 (4).png new file mode 100644 index 0000000..9e91a72 Binary files /dev/null and b/screenshots/output1 (4).png differ diff --git a/screenshots/output1 (5).png b/screenshots/output1 (5).png new file mode 100644 index 0000000..09a1aa5 Binary files /dev/null and b/screenshots/output1 (5).png differ diff --git a/screenshots/output1 (6).png b/screenshots/output1 (6).png new file mode 100644 index 0000000..aee7099 Binary files /dev/null and b/screenshots/output1 (6).png differ diff --git a/screenshots/output1 (7).png b/screenshots/output1 (7).png new file mode 100644 index 0000000..1fe7ae4 Binary files /dev/null and b/screenshots/output1 (7).png differ diff --git a/screenshots/output1 (8).png b/screenshots/output1 (8).png new file mode 100644 index 0000000..a423102 Binary files /dev/null and b/screenshots/output1 (8).png differ