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