Files
billai/docker-compose.runner.yaml
CHE LIANG ZHAO ed0a44851d
Some checks failed
Deploy BillAI / Deploy to Production (push) Failing after 0s
feat: 添加 Gitea Actions 自动部署功能
2026-01-26 17:21:12 +08:00

39 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Gitea Actions Runner - 自动部署
#
# 使用方法:
# 1. 在 Gitea 仓库获取 Runner Token
# 访问https://git.fadinglight.cn/clz/billai/settings/actions/runners
# 点击 "Create new Runner" 复制 Token
#
# 2. 创建 .env 文件或设置环境变量
# echo "GITEA_RUNNER_REGISTRATION_TOKEN=你的Token" > runner/.env
#
# 3. 启动 Runner
# docker compose -f docker-compose.runner.yaml up -d
#
# 4. 在 Gitea 仓库添加变量
# 访问https://git.fadinglight.cn/clz/billai/settings/actions/variables
# 添加 DEPLOY_PATH = /你的项目路径
services:
runner:
image: gitea/act_runner:latest
container_name: billai-runner
restart: unless-stopped
env_file:
- ./runner/.env
environment:
GITEA_INSTANCE_URL: "https://git.fadinglight.cn"
GITEA_RUNNER_NAME: "billai-runner"
GITEA_RUNNER_LABELS: "self-hosted:host,ubuntu-latest:host"
CONFIG_FILE: /config.yaml
volumes:
# Runner 配置文件
- ./runner/config.yaml:/config.yaml
# Runner 数据持久化
- ./runner/data:/data
# Docker socket - 用于在宿主机执行 docker 命令
- /var/run/docker.sock:/var/run/docker.sock
# 项目目录 - 用于执行部署脚本
- .:/workspace/billai