feat(nanoclaude): 배포 준비 — Dockerfile + self-SSH 로컬 분기
- Dockerfile: infra/ 복사, openssh-client, healthcheck 추가 - requirements.txt: asyncssh, python-dotenv 추가 - core/ssh.py: INFRA_LOCAL_HOST 환경변수로 self-SSH 대신 로컬 실행 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+19
-2
@@ -1,12 +1,29 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
# Install nanoclaude dependencies
|
||||
COPY nanoclaude/requirements.txt ./requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
# Copy nanoclaude app
|
||||
COPY nanoclaude/ ./
|
||||
|
||||
# Copy infra/ for infra_tool integration
|
||||
COPY infra/ ./infra/
|
||||
|
||||
# Ensure infra has its own dependencies (pydantic, asyncssh already in requirements)
|
||||
# Python path: /app is WORKDIR, so "from infra.core..." and "from tools..." both work
|
||||
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
EXPOSE 8100
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8100/health || exit 1
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8100"]
|
||||
|
||||
@@ -6,3 +6,5 @@ aiosqlite==0.20.0
|
||||
python-multipart==0.0.9
|
||||
caldav>=1.3.0
|
||||
vobject>=0.9.8
|
||||
asyncssh>=2.22.0
|
||||
python-dotenv>=1.0.0
|
||||
|
||||
Reference in New Issue
Block a user