feat: 添加 Gitea Actions 自动部署功能
Some checks failed
Deploy BillAI / Deploy to Production (push) Failing after 0s
Some checks failed
Deploy BillAI / Deploy to Production (push) Failing after 0s
This commit is contained in:
38
docker-compose.runner.yaml
Normal file
38
docker-compose.runner.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user