infra: migrate application from Mac mini to GPU server

- Integrate ollama + ai-gateway into root docker-compose.yml
  (NVIDIA GPU runtime, single compose for all services)
- Change NAS mount from SMB (NAS_SMB_PATH) to NFS (NAS_NFS_PATH)
  Default: /mnt/nas/Document_Server (fstab registered on GPU server)
- Update config.yaml AI endpoints:
  primary → Mac mini MLX via Tailscale (100.76.254.116:8800)
  fallback/embedding/vision/rerank → ollama (same Docker network)
  gateway → ai-gateway (same Docker network)
- Update credentials.env.example (remove GPU_SERVER_IP, add NFS path)
- Mark gpu-server/docker-compose.yml as deprecated
- Update CLAUDE.md network diagram and AI model config
- Update architecture.md, deploy.md, devlog.md for GPU server as main
- Caddyfile: auto_https off, HTTP only (TLS at upstream proxy)
- Caddy port: 127.0.0.1:8080:80 (localhost only)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-04-03 07:47:09 +09:00
parent 8afa3c401f
commit 0ca78640ee
11 changed files with 434 additions and 56 deletions

View File

@@ -22,7 +22,7 @@ services:
ports:
- "3100:3100"
volumes:
- ${NAS_SMB_PATH:-/Volumes/Document_Server}:/documents:ro
- ${NAS_NFS_PATH:-/mnt/nas/Document_Server}:/documents:ro
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3100/health').then(r=>{process.exit(r.ok?0:1)}).catch(()=>process.exit(1))"]
interval: 10s
@@ -30,12 +30,40 @@ services:
retries: 3
restart: unless-stopped
ollama:
image: ollama/ollama
volumes:
- ollama_data:/root/.ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
ports:
- "11434:11434"
restart: unless-stopped
ai-gateway:
build: ./gpu-server/services/ai-gateway
ports:
- "8081:8080"
environment:
- PRIMARY_ENDPOINT=http://100.76.254.116:8800/v1/chat/completions
- FALLBACK_ENDPOINT=http://ollama:11434/v1/chat/completions
- CLAUDE_API_KEY=${CLAUDE_API_KEY:-}
- DAILY_BUDGET_USD=${DAILY_BUDGET_USD:-5.00}
depends_on:
- ollama
restart: unless-stopped
fastapi:
build: ./app
ports:
- "8000:8000"
volumes:
- ${NAS_SMB_PATH:-/Volumes/Document_Server}:/documents
- ${NAS_NFS_PATH:-/mnt/nas/Document_Server}:/documents
- ./config.yaml:/app/config.yaml:ro
- ./scripts:/app/scripts:ro
- ./logs:/app/logs
@@ -62,8 +90,7 @@ services:
caddy:
image: caddy:2
ports:
- "8080:80"
- "9443:443"
- "127.0.0.1:8080:80"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
@@ -75,3 +102,4 @@ services:
volumes:
pgdata:
caddy_data:
ollama_data: