From 0d466b235c47f5dfa1ff99b1d508bcf884b7860f Mon Sep 17 00:00:00 2001 From: gahusb Date: Fri, 12 Jun 2026 07:19:51 +0900 Subject: [PATCH] =?UTF-8?q?feat(co-gahusb):=20=EC=8A=A4=EC=BA=90=ED=8F=B4?= =?UTF-8?q?=EB=93=9C=20(Dockerfile=C2=B7requirements=C2=B7config)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- co-gahusb/.gitignore | 3 +++ co-gahusb/Dockerfile | 12 ++++++++++++ co-gahusb/app/__init__.py | 0 co-gahusb/app/config.py | 21 +++++++++++++++++++++ co-gahusb/requirements.txt | 7 +++++++ co-gahusb/tests/__init__.py | 0 6 files changed, 43 insertions(+) create mode 100644 co-gahusb/.gitignore create mode 100644 co-gahusb/Dockerfile create mode 100644 co-gahusb/app/__init__.py create mode 100644 co-gahusb/app/config.py create mode 100644 co-gahusb/requirements.txt create mode 100644 co-gahusb/tests/__init__.py diff --git a/co-gahusb/.gitignore b/co-gahusb/.gitignore new file mode 100644 index 0000000..77ac754 --- /dev/null +++ b/co-gahusb/.gitignore @@ -0,0 +1,3 @@ +.venv/ +__pycache__/ +*.pyc diff --git a/co-gahusb/Dockerfile b/co-gahusb/Dockerfile new file mode 100644 index 0000000..0d946d4 --- /dev/null +++ b/co-gahusb/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.12-slim-bookworm +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir --timeout 600 --retries 5 -r requirements.txt + +COPY . . + +EXPOSE 8000 +CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] diff --git a/co-gahusb/app/__init__.py b/co-gahusb/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/co-gahusb/app/config.py b/co-gahusb/app/config.py new file mode 100644 index 0000000..e1e8d58 --- /dev/null +++ b/co-gahusb/app/config.py @@ -0,0 +1,21 @@ +# co-gahusb/app/config.py +import os + +REDIS_URL = os.environ.get("REDIS_URL", "redis://redis:6379") +CO_BUS_KEY = os.environ.get("CO_BUS_KEY", "") + +# 협업 역할 (세션별 1:1) +ROLES = ("FE", "BE", "AI", "Producer") + +# 교차 리소스 어드바이저리 락 대상 (이 외 이름도 락은 가능하나, 규약상 명시 대상) +LOCKABLE_RESOURCES = ( + "nas-deploy", + "stock-db-schema", + "lotto-db-schema", + "memory-mirror", + "nginx-conf", + "compose", +) + +DEFAULT_LOCK_TTL = 300 +TEAM_LOG_MAXLEN = 500 diff --git a/co-gahusb/requirements.txt b/co-gahusb/requirements.txt new file mode 100644 index 0000000..9f6052d --- /dev/null +++ b/co-gahusb/requirements.txt @@ -0,0 +1,7 @@ +mcp>=1.2.0 +starlette>=0.37 +uvicorn[standard]==0.34.0 +redis>=5.0 +pytest>=8.0 +pytest-asyncio>=0.24 +fakeredis>=2.21 diff --git a/co-gahusb/tests/__init__.py b/co-gahusb/tests/__init__.py new file mode 100644 index 0000000..e69de29