studynote/docker-compose.yml
MikiVL c4ac36fc03 更新部署脚本:切换到 Caddy + systemd 架构
- deploy.sh 改为使用 Caddy host 架构(不再依赖 docker nginx)
- 前端 dist 部署到 /opt/mikivl/note(Caddy note.mikivl.online root)
- 主页从 ../mikivl.online/index.html 上传(防止覆盖最新主页)
- 添加 better-sqlite3 自动重新编译逻辑
- docker-compose.yml 移除 program1 只读挂载限制

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-26 09:53:45 +08:00

39 lines
948 B
YAML

services:
hono-server:
image: node:22-alpine
working_dir: /app
command: npx tsx server/index.ts
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- MODELS_FILE=/app/models_data/models.json
- NODE_ENV=production
volumes:
- ./program1:/app
- models_data:/app/models_data
expose:
- "3001"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/models"]
interval: 30s
timeout: 5s
retries: 3
nginx:
image: nginx:1.27-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./homepage:/usr/share/nginx/html/homepage:ro
- ./app:/usr/share/nginx/html/app:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
depends_on:
hono-server:
condition: service_healthy
restart: unless-stopped
volumes:
models_data: