From 4f42efde187e24746f42a28bddc7887705db3760 Mon Sep 17 00:00:00 2001 From: jaehwang Date: Mon, 20 Apr 2026 13:52:31 +0900 Subject: [PATCH] =?UTF-8?q?1=EC=B0=A8=20=EC=9D=B8=ED=94=84=EB=9D=BC=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 44 ++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 15 +++++++++++++++ app/main.py | 8 ++++++++ docker-compose.yml | 11 +++++++++++ requirements.txt | 9 +++++++++ 5 files changed, 87 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 app/main.py create mode 100644 docker-compose.yml create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..83ef291 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +dist/ +*.egg-info/ +.eggs/ +*.egg + +# Virtual environments +.venv/ +venv/ +env/ +ENV/ + +# Environment variables +.env +.env.local +.env.*.local + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# Testing +.pytest_cache/ +.coverage +htmlcov/ +.tox/ + +# Docker +*.log + +# OS +.DS_Store +Thumbs.db + +# Alembic +alembic/versions/*.pyc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9d9d3e9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.13-slim + +WORKDIR /app + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..e12160d --- /dev/null +++ b/app/main.py @@ -0,0 +1,8 @@ +from fastapi import FastAPI + +app = FastAPI() + + +@app.get("/health") +def health(): + return {"status": "ok"} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..05bdaf4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +services: + o2o-infinith-backend: + build: + context: . + dockerfile: Dockerfile + container_name: o2o-infinith-api + ports: + - "8000:8000" + volumes: + - ./app:/app + restart: unless-stopped diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ed79f15 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +fastapi==0.136.0 +uvicorn[standard]==0.44.0 +pydantic==2.13.2 +pydantic-settings==2.13.1 +redis==7.4.0 +httpx==0.28.1 +python-jose[cryptography]==3.5.0 +passlib[bcrypt]==1.7.4 +python-multipart==0.0.26