Files
rent/deploy/docker/docker-compose.gitea.yml
T
xiaoquan 501adf7819 feat: 替换 GitLab 为 Gitea + Act Runner
- 删除 .gitlab-ci.yml
- 新增 .gitea/workflows/deploy.yml (Gitea Actions 工作流)
- 新增 deploy/docker/docker-compose.gitea.yml (Gitea + Act Runner)
- 更新 scripts/setup-server.sh 初始化脚本
- 更新 deploy/README.md 部署文档
- 更新 Makefile 新增 gitea-* 命令
- 更新 .env.example 新增 GITEA_RUNNER_TOKEN

Gitea 内存占用约 100MB,适合 4GB 小内存服务器

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 20:01:52 +08:00

50 lines
1.2 KiB
YAML

version: '3.8'
services:
gitea:
image: gitea/gitea:latest
container_name: rent-gitea
restart: always
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__server__ROOT_URL=http://localhost:3002/
- GITEA__server__HTTP_PORT=3000
- GITEA__server__SSH_PORT=2222
- GITEA__server__SSH_LISTEN_PORT=2222
ports:
- "3002:3000"
- "2222:2222"
volumes:
- gitea_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- gitea
act-runner:
image: gitea/act_runner:latest
container_name: rent-act-runner
restart: always
depends_on:
- gitea
environment:
- GITEA_INSTANCE_URL=http://gitea:3000
# 注册后在 Gitea Web 界面获取 token,填入下面配置
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_TOKEN:-change_me}
- GITEA_RUNNER_NAME=rent-deploy-runner
- GITEA_RUNNER_LABELS=rent-deploy:docker://node:18-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- act_runner_data:/data
networks:
- gitea
volumes:
gitea_data:
act_runner_data:
networks:
gitea:
name: gitea