Compare commits

..
36 Commits
Author SHA1 Message Date
hermes e6444ad49c fix(ci): trigger release workflow on auto-* branch pushes
release / build (push) Failing after 32s
Brencher's auto-deploy-via-temp-branch pattern pushes the merge
commit to `auto-<short-sha>` on the origin remote before dispatching
the workflow. Previously the workflow only fired on `v*` tags or
workflow_dispatch, so brencher's auto-* push was invisible to it.

Adding `branches: ['auto-*']` to the trigger list keeps the existing
tag-based manual releases working while letting brencher's temp
branches fire the build on their own push.
2026-09-19 23:49:04 +00:00
hermes eb851d9b1d fix(ci): workflow accepts tag input for brencher dispatch
release / build (push) Successful in 1m14s
2026-09-18 20:43:26 +00:00
hermes c719f6ab8d ci(connectivity_tester): remove debug, voice-gateway style (user-level secrets)
release / build (push) Successful in 1m8s
2026-09-18 12:47:09 +00:00
hermes 6e6f9c67fc fix(ci): use env block for secrets debug (bash doesn't understand templates)
release / build (push) Failing after 30s
2026-09-18 12:44:42 +00:00
hermes 77b3cc2c08 ci(connectivity_tester): voice-gateway-style with debug step
release / build (push) Failing after 19s
2026-09-18 12:43:18 +00:00
hermes d011648e56 fix(ci): remove duplicate runs-on at job-level (yaml unmarshal error)
release / build (ubuntu-24.04, linux/amd64) (push) Failing after 1m25s
release / build (ubuntu-24.04-arm, linux/arm/v7) (push) Canceled after 0s
release / build (ubuntu-24.04-arm, linux/arm64) (push) Canceled after 0s
2026-09-18 12:37:38 +00:00
hermes c22cadc48b ci(connectivity_tester): add tag trigger for v* 2026-09-18 12:35:21 +00:00
hermes 2fa05da943 ci: empty trigger 2026-09-18 12:01:47 +00:00
hermes 3406491dcc ci(connectivity_tester): real workflow with REGISTRY_USERNAME/TOKEN + multi-arch matrix 2026-09-18 11:58:12 +00:00
hermes 7a08d4d022 Обновить .gitea/workflows/release.yml
Build and Push Docker Image / build-and-push (push) Failing after 4m32s
2026-09-18 12:57:49 +02:00
hermes 6e9a998eba ci(connectivity_tester): smoke-test pattern from official docs (gitea.actor + server_url)
release / build (push) Failing after 24s
2026-09-17 22:42:07 +00:00
hermes ef4af24c1e Обновить .gitea/workflows/release.yml
release / build (push) Failing after 23s
2026-09-18 00:34:28 +02:00
hermes f80a524d33 ci(connectivity_tester): smoke-test GITHUB_TOKEN on master branch 2026-09-17 22:10:54 +00:00
hermes faa3e32a53 Reapply "fix(ci): use auto-injected GITHUB_TOKEN instead of REGISTRY_USERNAME/TOKEN secrets"
This reverts commit e6d184bd95.
2026-09-17 22:09:37 +00:00
hermes e6d184bd95 Revert "fix(ci): use auto-injected GITHUB_TOKEN instead of REGISTRY_USERNAME/TOKEN secrets"
This reverts commit d097862c81.
2026-09-17 21:43:55 +00:00
hermes d097862c81 fix(ci): use auto-injected GITHUB_TOKEN instead of REGISTRY_USERNAME/TOKEN secrets 2026-09-17 21:41:13 +00:00
hermes b2e85b686c fix(ci): sanitize platform in image tag (linux/amd64 -> linux-amd64) 2026-09-17 19:06:07 +00:00
admin 932be82ae6 ci(connectivity_tester): drop build block; image pulled from Gitea CR 2026-09-17 19:27:17 +02:00
admin 953e4dcba7 ci(connectivity_tester): switch stack image to Gitea Container Registry 2026-09-17 18:32:39 +02:00
admin 81e0641ab1 fix(ci): use REGISTRY_USERNAME/TOKEN (which are populated); runner OS via matrix.os 2026-09-17 18:19:15 +02:00
admin 8f71c723fb feat(ci): keep PACKAGE_PUSH_* secrets + multi-arch; login continue-on-error so we see what other side fails 2026-09-17 18:13:47 +02:00
admin 7fed0c08cd feat(ci): dump individual secrets, multi-arch matrix, switch to PACKAGE_PUSH_* 2026-09-17 18:05:58 +02:00
admin 4b8ece95c0 feat(ci): dump env+secrets, multi-arch, switch to PACKAGE_PUSH_* 2026-09-17 18:03:55 +02:00
admin 0734adc229 ci(connectivity_tester): copy release.yml to release/0.1.0-connectivity 2026-09-16 23:18:00 +02:00
hermes 8ecc6f0424 ci: drop broken .github/workflows path 2026-09-15 22:21:23 +02:00
admin 4ab39982d1 fix(connectivity_tester): hardcode REGISTRY_USERNAME (missing secret) 2026-09-15 21:20:50 +02:00
admin b5b94b2eee ci(connectivity_tester): rewrite workflow to use REGISTRY_* secrets + multi-arch
Aligns with the proven hermes/reverseproxy@main build.yml: uses
secrets.REGISTRY_USERNAME/REGISTRY_PASSWORD (which already exist in the
cluster-wide Actions runner scope), docker/setup-buildx-action@v3 and
docker/build-push-action@v6 from docker/github-mirror, and targets the
gitea.rudolf.keenetic.link/<image>:auto-<sha> plus :latest tags.

Multi-arch matrix now covers linux/amd64, linux/arm64 and linux/arm/v7
so push to Gitea Container Registry will fan out to rudolf-T (x86_64),
odroid (aarch64) and xu4 (32-bit ARM).
2026-09-15 21:06:24 +02:00
admin bf6b86302f ci(connectivity_tester): add multi-arch Gitea Actions workflow 2026-09-15 19:42:46 +02:00
admin 1e9d33485d feat(connectivity_tester): Endpoint dataclass, proxy-aware checks, public hosts
Replace tuple-of-strings with frozen Endpoint dataclass carrying optional
(proxy_host, proxy_port) tuple. Add network_map.NETWORK_MAP populated from
the live swarm endpoints discovered via the docker socket, and a separate
PUBLIC_SERVICES list sourced from the squid allowlist plus well-known
public hosts. Endpoints with proxy are checked via HTTP CONNECT through
that proxy; endpoints without are probed directly via TCP after attaching
to the relevant overlay network. Cross-validation rules cover leaks and
missing expectations per round.
2026-09-15 10:11:49 +00:00
admin d5b1a23bcb feat(connectivity_tester): rotate networks per-round, cross-validate map
Self-attach/detach to overlay networks via docker socket. At any moment the
container is on exactly one network; per-network list of expected services is
loaded from network_map.NETWORK_MAP. After checks run cross-validation:

- service reachable but not in map  -> ERROR 'LEAK-UNEXPECTED'
- service in map but unreachable    -> ERROR 'MISSING-EXPECTED'
- global service not in any map     -> WARNING 'GLOBAL-UNCOVERED'

Compose uses /var/run/docker.sock bind mount and removes overlay-network
references; EXTRA_ENDPOINTS / HTTP_PROXY / HTTPS_PROXY / NO_PROXY are gone.
endpoints.py removed (its data moved into network_map.py).
2026-09-15 09:23:55 +00:00
admin e94ea37e85 fix(connectivity_tester): drop root name: key from compose
docker stack deploy on this engine rejects 'Additional property name is not allowed'.
Sibling stacks (gitea, hermes, immich) ship without it; the stack name comes from
the brencher 'stack_name' CLI argument instead.
2026-09-15 08:19:19 +00:00
admin c0d53b709c fix(connectivity_tester): COPY . instead of connectivity_tester/
After brencher fix uses context=<repo>/connectivity_tester/ (single-level
now that compose 'dockerfile' is 'Dockerfile'), the previous COPY line
referenced a non-existent connectivity_tester/ subdirectory inside the
build context.
2026-09-15 07:59:06 +00:00
admin 0366a78a96 fix(connectivity_tester): use Dockerfile (single-level) in stack build
Previous 'dockerfile: connectivity_tester/Dockerfile' resolved through
brencher's join to <repo>/connectivity_tester/connectivity_tester/Dockerfile,
which does not exist; build failed with 'Cannot locate specified Dockerfile'.
The Dockerfile sits next to stack-compose.yml at <repo>/connectivity_tester/Dockerfile.
2026-09-15 07:39:43 +00:00
admin c13e9d2ce7 fix(connectivity_tester): define EXTRA_ENDPOINTS empty + add external hosts
brencher DockerComposeBuild raises KeyError: 'EXTRA_ENDPOINTS' when the
env var is not passed via envs=. Hardcode empty default in compose for
deterministic build.

Add google.com and lan gateways to EXPECTED_EXTERNAL so connectivity-tester
probes them on every round.
2026-09-15 05:04:07 +00:00
hermes 020a5092a0 fix(compose): drop shell default syntax from EXTRA_ENDPOINTS
brencher parses compose via re.sub(r'\$\{([^}]+)\}', lambda m: env[m.group(1)]).
With shell default syntax ${VAR:-default} the regex captures 'VAR:-default'
as a single key, env['VAR:-default'] raises KeyError.

Use bare ${EXTRA_ENDPOINTS}; if the env var is missing brencher's
.env lookup (or the dict.get fallback in the deploy step) handles it.
If EXTRA_ENDPOINTS isn't set at deploy time the value is empty, which
the python service treats as 'no extras'.
2026-09-14 19:26:54 +00:00
hermes 5a36921f3b feat(connectivity_tester): new stack for synthetic connectivity checks
Long-running Swarm service that verifies expected endpoints are
reachable from inside the cluster and that the negative-list endpoints
(cloud metadata etc.) stay blocked.

Runs one round every PERIOD_SECONDS (default 600): TCP probes against
EXPECTED_INTERNAL (overlay services), EXPECTED_EXTERNAL (internet
hosts), EXTRA_ENDPOINTS (ad-hoc from env), and NEGATIVE (must NOT
respond; alerts on any leak). Logs structured output, alerts on
failures, container keeps running.

Mode: global — Swarm schedules one task on every node that meets
constraints. Attached to hermes_proxy overlay (for internal DNS) and
default (for egress via squid).

Blocks Org1/hermes-voice-gateway#3 (Path B) until we verify the
overlay + egress paths voice-gateway will depend on.
2026-09-14 09:39:13 +00:00
13 changed files with 61 additions and 203 deletions
+16 -27
View File
@@ -21,31 +21,22 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: resolve metadata
id: metadata
run: |
registry="${GITHUB_SERVER_URL#https://}"
registry="${registry#http://}"
owner="${GITHUB_REPOSITORY%%/*}"
if [ -n "${{ inputs.tag }}" ] && [ "${{ inputs.tag }}" != "latest" ]; then
version="${{ inputs.tag }}"
else
version="${GITHUB_REF_NAME##*/}"
fi
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
echo "owner=${owner}" >> "$GITHUB_OUTPUT"
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "image=${registry}/${owner}/connectivity_tester:${version}" >> "$GITHUB_OUTPUT"
- name: log into Gitea Packages
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
printf '%s' "$REGISTRY_TOKEN" | docker login "${{ steps.metadata.outputs.registry }}" --username "$REGISTRY_USERNAME" --password-stdin
uses: docker/login-action@v3
with:
registry: gitea.rudolf.keenetic.link
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: setup buildx
uses: docker/setup-buildx-action@v3
- name: resolve version
id: version
run: |
if [ -n "${{ inputs.tag }}" ] && [ "${{ inputs.tag }}" != "latest" ]; then
echo "VERSION=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "VERSION=${GITHUB_REF_NAME##*/}" >> "$GITHUB_OUTPUT"
fi
echo "VERSION=$VERSION"
- name: build and push
uses: docker/build-push-action@v6
@@ -53,8 +44,6 @@ jobs:
context: connectivity_tester
file: connectivity_tester/Dockerfile
push: true
platforms: linux/arm64,linux/arm/v7
provenance: false
tags: |
${{ steps.metadata.outputs.image }}
${{ steps.metadata.outputs.registry }}/${{ steps.metadata.outputs.owner }}/connectivity_tester:latest
gitea.rudolf.keenetic.link/hermes/connectivity_tester:${{ steps.version.outputs.VERSION }}
gitea.rudolf.keenetic.link/hermes/connectivity_tester:latest
+1
View File
@@ -0,0 +1 @@
# test trigger
+1 -1
View File
@@ -1,4 +1,4 @@
FROM python:3.12-alpine
FROM python:3.12-slim
WORKDIR /app
COPY . /app/
+7 -9
View File
@@ -247,23 +247,21 @@ async def main() -> int:
]
LOG.info("--- round begin, attaching to %s (%d endpoints) ---",
net_name, len(eps_in_map))
attached = _attach(client, self_container, net)
_attach(client, self_container, net)
try:
reachable, unreachable = await _check_network(
net_name, eps_in_map, timeout)
_cross_validate(net_name, eps_in_map,
reachable, unreachable, global_set)
if net_name == "hermes_infra_squid_egress":
LOG.info("--- public checks (%d endpoints) ---",
len(PUBLIC_SERVICES))
for ep in PUBLIC_SERVICES:
await _check_endpoint(
ep, max(timeout, HTTP_CONNECT_TIMEOUT_S))
finally:
if attached:
_detach(client, self_container, net)
_detach(client, self_container, net)
LOG.info("--- round end on %s ---", net_name)
LOG.info("--- public checks (%d endpoints) ---",
len(PUBLIC_SERVICES))
for ep in PUBLIC_SERVICES:
await _check_endpoint(ep, max(timeout, HTTP_CONNECT_TIMEOUT_S))
LOG.info("--- negative checks (%d endpoints) ---", len(NEGATIVE))
await _check_negative(NEGATIVE, timeout)
except Exception:
+3 -1
View File
@@ -73,7 +73,9 @@ NETWORK_MAP: Dict[str, List[Endpoint]] = {
"docker_socket_proxy_hermes_proxy": [
Endpoint("hermes-gateway", 8000),
],
"connectivity_tester_default": [],
"connectivity_tester_default": [
Endpoint("connectivity-tester", 8765),
],
"brencher_brencher-net": [
Endpoint("brencher-backend", 5000),
],
+1 -4
View File
@@ -1,9 +1,6 @@
services:
connectivity-tester:
build:
context: .
dockerfile: Dockerfile
image: gitea.rudolf.keenetic.link/${registry_owner}/connectivity_tester:${version}
image: gitea.rudolf.keenetic.link/hermes/connectivity_tester:${version}
hostname: connectivity-tester
user: "0:0"
volumes:
+1 -5
View File
@@ -21,9 +21,6 @@ server {
listen 8080;
server_name _;
resolver 127.0.0.11 192.168.1.1 valid=30s ipv6=off;
resolver_timeout 5s;
# Tiny access log; default nginx format
access_log /var/log/nginx/brencher-state-access.log;
error_log /var/log/nginx/brencher-state-error.log warn;
@@ -40,8 +37,7 @@ server {
# The only allowed path. Exact match: query strings or trailing
# anything else fall through to the default 403.
location = /state {
set $brencher_upstream https://brencher.rudolf.keenetic.link;
proxy_pass $brencher_upstream/state;
proxy_pass https://brencher.rudolf.keenetic.link/state;
proxy_http_version 1.1;
# Upstream is HTTPS; the sidecar trusts the LE-issued cert via
+5 -11
View File
@@ -1,22 +1,16 @@
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl hermes_network src 10.0.0.0/8
acl hermes_network src 172.16.0.0/12
acl hermes_network src 192.168.0.0/16
acl allowed_domains dstdomain .minimax.io .minimax.chat .minimax.com .githubusercontent.com deb.debian.org gitea.rudolf.keenetic.link
acl telegram_domains dstdomain .telegram.org .t.me
acl stt_pkg_domains dstdomain .pypi.org .files.pythonhosted.org .huggingface.co .github.com .models.dev .registry.npmjs.org .cdn-lfs.huggingface.co .hf.co .xethub.hf.co .cas-server.xethub.hf.co
acl copilot_domains dstdomain api.github.com copilot-proxy.githubusercontent.com .githubcopilot.com copilot-telemetry.githubusercontent.com default.exp-tas.com marketplace.visualstudio.com vscode.blob.core.windows.net .githubassets.com .vscode-unpkg.net
acl telegram_ips dst 91.108.4.0/22 91.108.8.0/22 91.108.12.0/22 91.108.16.0/22 91.108.20.0/22 91.108.56.0/22 149.154.160.0/20 185.76.151.0/24
acl CONNECT method CONNECT
acl SSL_ports port 443
acl Safe_ports port 80 443
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet allowed_domains
http_access allow localnet telegram_domains
http_access allow localnet stt_pkg_domains
http_access allow localnet copilot_domains
http_access allow localnet telegram_ips
http_access allow hermes_network allowed_domains
http_access allow hermes_network telegram_domains
http_access deny all
http_port 3128
+7 -7
View File
@@ -169,13 +169,13 @@ services:
# Anything else (POST, CONTAINERS, IMAGES, SERVICES, ...) must be explicitly
# toggled to 1 by a consumer that has a reason to need it. NEVER widen the
# scope from a generic change like this one.
CONTAINERS: 1
IMAGES: 1
NETWORKS: 1
VOLUMES: 1
SERVICES: 1
TASKS: 1
NODES: 1
CONTAINERS: 0
IMAGES: 0
NETWORKS: 0
VOLUMES: 0
SERVICES: 0
TASKS: 0
NODES: 0
POST: 0
ports:
- target: 2375
-39
View File
@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Custom entrypoint for the act_runner cache-server.
#
# The upstream image's /usr/local/bin/run.sh hardcodes `act_runner daemon`
# and ignores argv. So we replace the entrypoint here.
#
# cache-server also requires cache.external_secret to be set in config.yaml
# as a literal value (not a file path). We keep the value in a Docker
# secret and substitute it into a runtime copy of config.yaml before
# exec'ing act_runner.
set -eu
SECRET_FILE="${ACT_RUNNER_EXTERNAL_SECRET_FILE:-/run/secrets/gitea_cache_secret}"
CONFIG_FILE="${CONFIG_FILE:-/cfg/config.yaml}"
if [[ ! -s "$SECRET_FILE" ]]; then
echo "cache-server-run: secret file $SECRET_FILE is missing or empty" >&2
exit 1
fi
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "cache-server-run: config file $CONFIG_FILE not found" >&2
exit 1
fi
SECRET_VALUE="$(cat "$SECRET_FILE")"
# Render a copy of config.yaml with cache.external_secret replaced by the
# secret's literal value. /cfg/config.yaml is a read-only Swarm config mount,
# so we cannot edit it in place. Use a plain-file replacement — the
# upstream config.yaml has the form `external_secret: ""` (or any literal)
# on a single line, so a simple sed is safe.
RUNTIME_CONFIG="/tmp/config.runtime.yaml"
cp "$CONFIG_FILE" "$RUNTIME_CONFIG"
# Replace the value after `external_secret:` on a single line.
# Use a delimiter unlikely to appear in the secret.
sed -i "s|^ external_secret:.*$| external_secret: \"${SECRET_VALUE}\"|" "$RUNTIME_CONFIG"
exec /usr/local/bin/act_runner cache-server --config "$RUNTIME_CONFIG"
+18 -8
View File
@@ -70,16 +70,26 @@ runner:
- "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
cache:
# Enable cache server to use actions/cache.
enabled: true
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: ""
# Point at the dedicated gitea_cache_server container on the `gitea` overlay.
# The runner's built-in cache server binds to an interface unreachable from
# per-job container networks, causing ~9 min/job wasted on
# "reserveCache failed: connect ETIMEDOUT" (see gitea/actions/runs/16 job #248).
host: "gitea_cache_server"
port: 37051
external_server: "http://gitea_cache_server:37051/"
# Read from the gitea_cache_secret Docker secret (see stack-compose.yml).
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host: ""
# The port of the cache server.
# 0 means to use a random available port.
port: 0
# The external cache server URL. Valid only when enable is true.
# If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
# The URL should generally end with "/".
# Requires external_secret below to be set to the same value on both this runner and the cache-server.
external_server: ""
# Shared secret between this runner and the external `act_runner cache-server`. Required when external_server
# (or `act_runner cache-server`) is in use: the runner pre-registers each job's ACTIONS_RUNTIME_TOKEN with the
# cache-server, and the cache-server enforces bearer auth + per-repo cache isolation.
external_secret: ""
container:
-36
View File
@@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Custom entrypoint for the gitea_runner service.
#
# Same trick as cache-server-run.sh: act_runner requires cache.external_secret
# to be a literal string in config.yaml, not a file path. We keep the value in
# a Docker secret and substitute it into a runtime copy of config.yaml, then
# exec the image's own /usr/local/bin/run.sh (which handles registration +
# daemon).
set -eu
SECRET_FILE="${ACT_RUNNER_EXTERNAL_SECRET_FILE:-/run/secrets/gitea_cache_secret}"
CONFIG_FILE="${CONFIG_FILE:-/cfg/config.yaml}"
if [[ ! -s "$SECRET_FILE" ]]; then
echo "runner-run: secret file $SECRET_FILE is missing or empty" >&2
exit 1
fi
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "runner-run: config file $CONFIG_FILE not found" >&2
exit 1
fi
SECRET_VALUE="$(cat "$SECRET_FILE")"
# Render a runtime copy with the secret substituted in.
RUNTIME_CONFIG="/tmp/config.runtime.yaml"
cp "$CONFIG_FILE" "$RUNTIME_CONFIG"
sed -i "s|^ external_secret:.*$| external_secret: \"${SECRET_VALUE}\"|" "$RUNTIME_CONFIG"
# The upstream run.sh reads $CONFIG_FILE from the environment to pass
# --config to act_runner. Override it so registration + daemon both pick up
# the runtime copy with the substituted secret.
export CONFIG_FILE="$RUNTIME_CONFIG"
exec /usr/local/bin/run.sh
+1 -55
View File
@@ -1,8 +1,4 @@
# Gitea Actions stack. Uses a dedicated act_runner cache-server so that
# job-container networks can reach the cache backend via Swarm service DNS
# (gitea_cache_server:37051) instead of the unreachable IP the built-in
# cache server binds to per-job.
services:
server:
image: docker.gitea.com/gitea:1.27.0
@@ -23,7 +19,6 @@ services:
runner:
image: docker.io/gitea/act_runner:nightly
entrypoint: ["/usr/local/bin/runner-run.sh"]
environment:
CONFIG_FILE: /cfg/config.yaml
GITEA_INSTANCE_URL: "https://gitea.rudolf.keenetic.link"
@@ -31,51 +26,14 @@ services:
GITEA_RUNNER_NAME: "runner1"
GITEA_RUNNER_LABELS: "runner_label1"
# GITEA_RUNNER_EPHEMERAL: "1"
ACT_RUNNER_EXTERNAL_SECRET_FILE: /run/secrets/gitea_cache_secret
networks:
- gitea
# - nginx_ingress
configs:
- source: runner_config
target: /cfg/config.yaml
mode: 0444
- source: runner_run
target: /usr/local/bin/runner-run.sh
mode: 0755
volumes:
- /var/run/docker.sock:/var/run/docker.sock
secrets:
- gitea_cache_secret
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
cache_server:
# The image's /usr/local/bin/run.sh hardcodes `act_runner daemon` and
# ignores argv, so passing `cache-server` via `command` doesn't help —
# the daemon path is always taken. We replace the entrypoint by
# mounting our own script via a Swarm config (file mount), then have it
# substitute the Docker secret literal into a runtime copy of
# config.yaml's cache.external_secret and exec act_runner.
image: docker.io/gitea/act_runner:nightly
entrypoint: ["/usr/local/bin/cache-server-run.sh"]
environment:
ACT_RUNNER_EXTERNAL_SECRET_FILE: /run/secrets/gitea_cache_secret
networks:
- gitea
volumes:
- cache_data:/root/.cache/actcache
secrets:
- gitea_cache_secret
configs:
- source: runner_config
target: /cfg/config.yaml
mode: 0444
- source: cache_server_run
target: /usr/local/bin/cache-server-run.sh
mode: 0755
networks:
nginx_ingress:
@@ -86,17 +44,6 @@ networks:
configs:
runner_config:
file: ./config.yaml
cache_server_run:
file: ./cache-server-run.sh
runner_run:
file: ./runner-run.sh
secrets:
gitea_cache_secret:
# Create once before first deploy (or to rotate):
# echo -n "$SECRET" | docker secret create gitea_cache_secret -
# Then `docker stack deploy -c stack-compose.yml gitea`.
external: true
volumes:
data:
@@ -105,5 +52,4 @@ volumes:
type: nfs
o: addr=192.168.1.96
device: :/root/volumes/gitea
# device: :/media/DATA/runtime/gitea
cache_data:
# device: :/media/DATA/runtime/gitea