Skip to content

Commit 4a6cff5

Browse files
authored
Merge pull request #3 from Team-StackUp/feature/add-infra-and-ai-setup
feat: AI 서버 프로젝트 및 로컬 인프라 초기 구성
2 parents 6020527 + 7112ba3 commit 4a6cff5

28 files changed

Lines changed: 3005 additions & 7 deletions

.env.example

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PostgreSQL
2+
POSTGRES_DB=stackup
3+
POSTGRES_USER=stackup
4+
POSTGRES_PASSWORD=stackup
5+
POSTGRES_PORT=5432
6+
7+
# RabbitMQ
8+
RABBITMQ_USER=stackup
9+
RABBITMQ_PASSWORD=stackup
10+
RABBITMQ_PORT=5672
11+
RABBITMQ_MANAGEMENT_PORT=15672
12+
13+
# MinIO (S3)
14+
MINIO_ROOT_USER=minioadmin
15+
MINIO_ROOT_PASSWORD=minioadmin
16+
MINIO_API_PORT=9000
17+
MINIO_CONSOLE_PORT=9001
18+
MINIO_BUCKET=stackup

.github/workflows/lint.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ jobs:
2727
- name: Setup Python
2828
uses: actions/setup-python@v5
2929
with:
30-
python-version: '3.11'
31-
cache: 'pip'
30+
python-version: '3.13'
31+
32+
- name: Install uv
33+
uses: astral-sh/setup-uv@v5
3234

3335
- name: Setup Java
3436
uses: actions/setup-java@v4
@@ -79,14 +81,12 @@ jobs:
7981
# AI (Python)
8082
- name: Install AI dependencies
8183
working-directory: ./ai
82-
run: |
83-
pip install -r requirements.txt
84-
pip install flake8 black pylint
84+
run: uv sync --extra dev
8585

8686
- name: Lint AI (flake8)
8787
working-directory: ./ai
88-
run: flake8 . --max-line-length=120 --exclude=venv,__pycache__
88+
run: uv run flake8 .
8989

9090
- name: Check AI formatting (black)
9191
working-directory: ./ai
92-
run: black --check .
92+
run: uv run black --check .

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode
2+
.claude

CLAUDE.md

Lines changed: 680 additions & 0 deletions
Large diffs are not rendered by default.

ai/.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
__pycache__
2+
*.pyc
3+
.env
4+
.venv/
5+
venv/
6+
.git/
7+
tests/
8+
*.md

ai/.env.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Application
2+
DEBUG=false
3+
4+
# RabbitMQ
5+
RABBITMQ_URL=amqp://stackup:stackup@localhost:5672/
6+
7+
# S3 / MinIO
8+
S3_ENDPOINT_URL=http://localhost:9000
9+
S3_ACCESS_KEY=minioadmin
10+
S3_SECRET_KEY=minioadmin
11+
S3_BUCKET_NAME=stackup
12+
13+
# LLM API Keys
14+
OPENAI_API_KEY=
15+
GOOGLE_API_KEY=

ai/.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 500
3+
exclude = venv,.venv,__pycache__
4+
extend-ignore = E203,W503

ai/.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Virtual environment
2+
.venv/
3+
venv/
4+
5+
# Python
6+
__pycache__/
7+
*.pyc
8+
*.pyo
9+
10+
# Environment
11+
.env
12+
13+
# pytest
14+
.pytest_cache/
15+
16+
# IDE
17+
.idea/
18+
.vscode/
19+
*.swp

ai/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

ai/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.13-slim
2+
3+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
4+
5+
WORKDIR /app
6+
7+
COPY pyproject.toml uv.lock ./
8+
RUN uv sync --frozen --no-dev
9+
10+
COPY src/ src/
11+
12+
EXPOSE 8000
13+
14+
CMD ["uv", "run", "uvicorn", "ai_server.main:app", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)