Multi-stage build: node builds frontend dist, golang builds static binary (modernc sqlite, CGO off), alpine runtime runs nginx :80 + backend :8890 in one container. nginx serves SPA with fallback, strips /api prefix (same as vite dev proxy), proxies protocol endpoints (/mcp, /m/*, /v1/*, /d/*, /ws/*, *.php) with buffering off for NDJSON/SSE streams and WS upgrade headers. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
18 lines
530 B
YAML
18 lines
530 B
YAML
services:
|
|
cyibox:
|
|
build: .
|
|
image: cyi-box:latest
|
|
container_name: cyibox
|
|
ports:
|
|
- "8890:80" # 对外端口,左侧可改成任意宿主端口
|
|
volumes:
|
|
- cyibox-data:/app/data # SQLite + vault.key + 网盘文件都落这里
|
|
environment:
|
|
CYIBOX_ADMIN_PASSWORD: ${CYIBOX_ADMIN_PASSWORD:-admin123} # 首启种子管理员密码,建议改
|
|
# CYIBOX_ADMIN_NAME: admin
|
|
# CYIBOX_CORS: "https://a.com,https://b.com"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
cyibox-data:
|