添加 Docker 服务配置文件

新增 forgejo、mihomo 透明代理的 docker-compose 和配置文件,
敏感凭证(runner token、VLESS UUID)通过 .env 管理不入库。
同步更新 CLAUDE.md 目录结构说明,新增 README.md。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-05-31 00:31:38 +08:00
parent 71a7eef7e6
commit d6692b8776
10 changed files with 228 additions and 23 deletions
+1
View File
@@ -0,0 +1 @@
GITEA_RUNNER_REGISTRATION_TOKEN=
+35
View File
@@ -0,0 +1,35 @@
services:
forgejo:
image: gitea/gitea:latest
container_name: forgejo
restart: always
environment:
USER_UID: 1000
USER_GID: 1000
GITEA__actions__ENABLED: "true"
GITEA__actions__DEFAULT_ACTIONS_URL: https://gitea.com
GITEA__server__ROOT_URL: http://git.51yanmei.com/
GITEA__server__SSH_DOMAIN: git.51yanmei.com
GITEA__server__SSH_PORT: 2222
ports:
- "3000:3000"
- "2222:22"
volumes:
- /volume1/docker/forgejo/data:/data
act-runner:
image: gitea/act_runner:latest
container_name: forgejo-act-runner
restart: always
network_mode: host
depends_on:
- forgejo
environment:
CONFIG_FILE: /data/config.yaml
GITEA_INSTANCE_URL: http://git.51yanmei.com/
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN}
GITEA_RUNNER_NAME: nas-runner
volumes:
- /volume1/docker/forgejo/runner:/data
- /var/run/docker.sock:/var/run/docker.sock
- /volume1/docker/backups:/volume1/docker/backups
+23
View File
@@ -0,0 +1,23 @@
log:
level: info
runner:
file: .runner
capacity: 1
timeout: 3h
labels:
- ubuntu-latest:docker://catthehacker/ubuntu:act-latest
cache:
enabled: true
dir: /data/cache
container:
network: bridge
privileged: false
options: >-
-v /volume1/docker/backups:/volume1/docker/backups
-v /volume1/docker/tools:/volume1/docker/tools
valid_volumes:
- /volume1/docker/backups
- /volume1/docker/tools
+12
View File
@@ -0,0 +1,12 @@
# DHCP 服务
dhcp-range=192.168.3.10,192.168.3.230,12h
dhcp-option=3,192.168.3.200
dhcp-option=6,192.168.3.200
# DNS 上游指向 Mihomo(端口 1053
server=127.0.0.1#1053
# 本地解析
address=/nas.local/192.168.3.200
no-hosts
+11
View File
@@ -0,0 +1,11 @@
services:
mihomo:
image: metacubex/mihomo:latest
container_name: mihomo
restart: always
network_mode: host
privileged: true
volumes:
- /volume1/docker/proxy/mihomo:/root/.config/mihomo
environment:
- TZ=Asia/Shanghai
+1
View File
@@ -0,0 +1 @@
VLESS_UUID=
+69
View File
@@ -0,0 +1,69 @@
mixed-port: 7890
allow-lan: true
bind-address: '*'
mode: rule
log-level: info
ipv6: false
external-controller: 0.0.0.0:9090
tun:
enable: true
stack: gvisor
mtu: 1500
auto-route: true
auto-detect-interface: true
route-exclude-address:
- 18.136.60.128/32
dns-hijack:
- any:53
dns:
enable: true
listen: 0.0.0.0:53
enhanced-mode: fake-ip
fake-ip-persist: true
fake-ip-range: 198.18.0.0/15
fake-ip-filter:
- '*.lan'
- '*.local'
- 'time.*.com'
- 'ntp.*.com'
- '+.pool.ntp.org'
nameserver:
- 114.114.114.114
- 223.5.5.5
fallback:
- 8.8.8.8
- 1.1.1.1
fallback-filter:
geoip: true
geoip-code: CN
proxies:
- name: "ec2-sg"
type: vless
server: 18.136.60.128
port: 443
uuid: <VLESS_UUID>
network: tcp
tls: true
udp: true
reality-opts:
public-key: fHHr9qWw2JuqNxpv3XTcZTi5k73HWfjipa4vnXFu9W8
short-id: 6eb28f1a766a
servername: www.cloudflare.com
client-fingerprint: chrome
proxy-groups:
- name: "Proxy"
type: select
proxies:
- ec2-sg
- DIRECT
rules:
- GEOIP,private,DIRECT
- GEOSITE,cn,DIRECT
- GEOIP,CN,DIRECT
- MATCH,Proxy