Files
chiyiandDevin 5621c32dec add Dockerfile + docker-compose: single-image deploy (nginx + backend)
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>
2026-10-08 08:57:30 +08:00

16 lines
313 B
Bash

#!/bin/sh
set -e
# 后端跑在容器内 8890,nginx 对外 80(托管前端 + 反代 API/协议端点)
/app/cyibox &
API_PID=$!
trap 'kill -TERM $API_PID 2>/dev/null' TERM INT
nginx -g 'daemon off;' &
NGINX_PID=$!
wait $NGINX_PID
kill -TERM $API_PID 2>/dev/null || true
wait $API_PID 2>/dev/null || true