4 Commits
Author SHA1 Message Date
kiskaadee 954cbc1c7f feat(github_runner): target canopy-homelab organization with RUNNER_SCOPE=org
- github_runner/docker-compose.yml: configure primary runner for RUNNER_SCOPE=org, ORG_NAME=canopy-homelab, APP_LOGIN=canopy-homelab, and state under ../../var/lib/homelab/github_runner/canopy-homelab

- github_runner/.env-example: keep .env strictly scoped to shared GitHub App ID, base64 key, and labels
2026-11-24 01:14:32 -05:00
kiskaadee 359ee51586 feat(github_runner): support shared App credentials and multi-org Compose anchors
- github_runner/docker-compose.yml: add x-runner-common/x-runner-env anchors so org runners can be added per-service without duplicating App credentials in .env; default primary runner to RUNNER_SCOPE=repo and APP_LOGIN=kiskaadee

- github_runner/.env-example: keep .env scoped to shared App ID, base64 key, labels, and personal repo URL
2026-11-23 17:36:36 -05:00
kiskaadee 1981398cf3 Merge branch 'fix/gitea-ratelimit-robots' 2026-11-23 16:47:18 -05:00
kiskaadee 9ff2a4c714 fix(gitea): add robots.txt and attach public-ratelimit Traefik middleware
- gitea/robots.txt: disallow crawler traps on /*/*/pulls, issues, commits, archive, graph, forks, stars, watchers, activity, and /explore

- gitea/docker-compose.yml: mount ./robots.txt read-only into /data/gitea/public/robots.txt and attach public-ratelimit@docker middleware
2026-11-23 16:25:02 -05:00
4 changed files with 33 additions and 20 deletions

No files matched your search

+2
View File
@@ -19,6 +19,7 @@ services:
- "${SSH_PORT:-2223}:22"
volumes:
- ../../var/lib/homelab/gitea:/data
- ./robots.txt:/data/gitea/public/robots.txt:ro
networks:
- proxy-net
labels:
@@ -28,6 +29,7 @@ services:
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.entrypoints=${HTTPS_ENTRYPOINT:-websecure}"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls=true"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.tls.certresolver=${CERT_RESOLVER:-myresolver}"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.middlewares=${RATE_LIMIT_MIDDLEWARE:-public-ratelimit@docker}"
- "traefik.http.routers.${CONTAINER_NAME:-gitea}.service=${CONTAINER_NAME:-gitea}-svc"
# HTTP to HTTPS Redirect Router
- "traefik.http.routers.${CONTAINER_NAME:-gitea}-red.rule=Host(`${SERVICE_DOMAIN}`)"
+11
View File
@@ -0,0 +1,11 @@
User-agent: *
Disallow: /*/*/pulls
Disallow: /*/*/issues
Disallow: /*/*/commits
Disallow: /*/*/archive
Disallow: /*/*/graph
Disallow: /*/*/forks
Disallow: /*/*/stars
Disallow: /*/*/watchers
Disallow: /*/*/activity
Disallow: /explore
+1 -5
View File
@@ -1,9 +1,5 @@
# GitHub Actions Runner environment variables (injected at runtime; never commit real credentials)
GITHUB_RUNNER_NAME=homelab-github-runner
GITHUB_RUNNER_SCOPE=org
GITHUB_RUNNER_ORG_NAME=replace-with-github-org
# Shared GitHub App credentials (injected at runtime; never commit real credentials)
GITHUB_RUNNER_APP_ID=replace-with-github-app-id
GITHUB_RUNNER_APP_LOGIN=replace-with-github-app-slug
# Single-line base64-encoded GitHub App PEM private key: base64 -w0 < private-key.pem
GITHUB_RUNNER_APP_PRIVATE_KEY_B64=replace-with-base64-encoded-pem
GITHUB_RUNNER_LABELS=self-hosted,linux,x64,nix
+19 -15
View File
@@ -1,24 +1,28 @@
x-runner-common: &runner-common
image: ${RUNNER_IMAGE:-github-runner:local}
restart: unless-stopped
environment: &runner-env
EPHEMERAL: ${EPHEMERAL:-true}
RUN_AS_ROOT: "false"
DISABLE_AUTO_UPDATE: ${DISABLE_AUTO_UPDATE:-true}
RUNNER_WORKDIR: /data/work
APP_ID: ${GITHUB_RUNNER_APP_ID:-}
APP_PRIVATE_KEY_B64: ${GITHUB_RUNNER_APP_PRIVATE_KEY_B64:-}
LABELS: ${GITHUB_RUNNER_LABELS:-self-hosted,linux,x64,nix}
services:
github_runner:
<<: *runner-common
build: .
image: ${RUNNER_IMAGE:-github-runner:local}
container_name: ${CONTAINER_NAME:-github_runner}
restart: unless-stopped
environment:
- EPHEMERAL=${EPHEMERAL:-true}
- RUN_AS_ROOT=false
- DISABLE_AUTO_UPDATE=${DISABLE_AUTO_UPDATE:-true}
- RUNNER_WORKDIR=/data/work
- RUNNER_NAME=${GITHUB_RUNNER_NAME:-homelab-github-runner}
- RUNNER_SCOPE=${GITHUB_RUNNER_SCOPE:-org}
- ORG_NAME=${GITHUB_RUNNER_ORG_NAME:-}
- REPO_URL=${GITHUB_RUNNER_REPO_URL:-}
- APP_ID=${GITHUB_RUNNER_APP_ID:-}
- APP_LOGIN=${GITHUB_RUNNER_APP_LOGIN:-}
- APP_PRIVATE_KEY_B64=${GITHUB_RUNNER_APP_PRIVATE_KEY_B64:-}
- LABELS=${GITHUB_RUNNER_LABELS:-self-hosted,linux,x64,nix}
<<: *runner-env
RUNNER_NAME: ${GITHUB_RUNNER_NAME:-homelab-runner-canopy}
RUNNER_SCOPE: org
APP_LOGIN: canopy-homelab
ORG_NAME: canopy-homelab
volumes:
- ../../var/lib/homelab/github_runner:/data
- ../../var/lib/homelab/github_runner/canopy-homelab:/data
- nix-store:/nix
volumes: