添加 docker-compose.cache-server.yaml

[skip ci]

Signed-off-by: gitea_1-h.cc <i@oo1.dev>
This commit is contained in:
2026-04-29 16:30:34 +08:00
parent 9919556d5d
commit 0abeef8fd8
+45
View File
@@ -0,0 +1,45 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
x-ignore_this: |
docker run --rm -it --entrypoint act_runner docker.io/gitea/act_runner:nightly cache-server --help
services:
cache-server:
# image: docker.io/gitea/act_runner:v0.6.0
image: docker.io/gitea/act_runner:nightly
container_name: gitea-runner-cache-server
restart: unless-stopped
stop_signal: SIGINT
stop_grace_period: 5s
labels:
com.centurylinklabs.watchtower.enable: "true"
environment:
TZ: Asia/Shanghai
# CACHE_EXTERNAL_SECRET: ${CACHE_EXTERNAL_SECRET:?set CACHE_EXTERNAL_SECRET}
CACHE_EXTERNAL_SECRET: 7990850f9cffc2a8504d629b401ca0667d26adf6d648ac29496fffd3f70282a5
CACHE_EXTERNAL_HOST: ${CACHE_EXTERNAL_HOST:-gitea-runner-cache-server.oo1.dev}
CACHE_EXTERNAL_PORT: ${CACHE_EXTERNAL_PORT:-9999}
volumes:
- gitea-runner-cache-server:/runner-cache
- /etc/localtime:/etc/localtime:ro
ports:
- "${CACHE_EXTERNAL_PORT:-9999}:${CACHE_EXTERNAL_PORT:-9999}"
entrypoint: ["/sbin/tini", "--", "/bin/sh"]
command:
- -ec
- |
# printf '%s\n' \
# 'cache:' \
# " external_secret: \"$${CACHE_EXTERNAL_SECRET}\"" \
# > /tmp/cache-server.yaml
cat >/tmp/cache-server.yaml <<EOF
cache:
external_secret: "$${CACHE_EXTERNAL_SECRET}"
EOF
exec act_runner --config /tmp/cache-server.yaml cache-server \
--dir /runner-cache \
--port "$${CACHE_EXTERNAL_PORT}" \
--host "$${CACHE_EXTERNAL_HOST}"
volumes:
gitea-runner-cache-server: