a6257d2fc4
- Dockerfile 四阶段:web/admin 前端构建 → go 静态编译(embed 双前端) → alpine 运行镜像(53MB, 非 root, Asia/Shanghai) - docker-compose.yml:132 部署用,暴露 8090,env_file 读本机 .env,带 healthcheck - .gitea/workflows/deploy.yml:push dev → runner 构建 → docker save|gzip → sshpass scp → 132 load+up → 健康检查 - deploy/nginx-site.sundynix.cn.conf:公网 nginx 反代(穿透回源 site.sundynix.cn) - .env.production.example + deploy/README.md:部署手册(secrets、127:3307 数据库、证书) - 已本地验证:镜像构建通过 + 容器冒烟(健康/用户端/管理端/logo/RSS/登录)全绿 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
584 B
YAML
19 lines
584 B
YAML
# 部署机 192.168.100.132:/home/workspace/sundynix-site/ 使用
|
|
# 镜像由 CI 用 docker save + scp + docker load 送入,标签固定 sundynix-site:latest
|
|
services:
|
|
site:
|
|
image: sundynix-site:latest
|
|
container_name: sundynix-site
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
# 暴露给本机内网穿透客户端;公网 nginx 经隧道回源到这里
|
|
- "8090:8090"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8090/api/healthz"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|