gitea/peertube runner foundations. secrets mgmt is a blocker. Adding that to my shell framework and will vendor that framework into here.

This commit is contained in:
2025-07-15 10:53:19 -05:00
parent b4b36b6084
commit 8c402e3084
5 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1 @@
https://docs.gitea.com/next/usage/actions/act-runner/

View File

@@ -0,0 +1,14 @@
version: "3.8"
services:
runner:
image: docker.io/gitea/act_runner:nightly
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
GITEA_RUNNER_NAME: "${RUNNER_NAME}"
GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
volumes:
- ./config.yaml:/config.yaml
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock

View File

@@ -0,0 +1,9 @@
FROM alpine:latest
RUN apk add --no-cache nodejs npm ffmpeg
RUN npm install -g @peertube/peertube-runner
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -0,0 +1,21 @@
# PeerTube Runner Docker
This Docker image sets up a PeerTube runner with all necessary dependencies installed.
When stopping the container, the runner is removed from the peertube instance.
Name is set to the container ID when run standalone, and the node name when run in a swarm .
## Usage
1. **Environment Variables**:
- `URL`: PeerTube instance URL.
- `TOKEN`: Registration token.
2. **Run the Container**:
```bash
docker run -e URL=http://127.0.0.1:9000 -e TOKEN=ptrrt-**** peertube-runner
```
## Note
This container is meant to be a basic runner, so there is no encryption or captioning

View File

@@ -0,0 +1,20 @@
#!/bin/sh
if [ -n "$DOCKER_SERVICE_NAME" ]; then
NAME="$NODE_NAME"
else
NAME=$(uname -n)
fi
cleanup() {
echo "Container is stopping, removing runner '$NAME'..."
peertube-runner unregister --url $URL --runner-name $NAME
}
trap cleanup SIGTERM
echo "Starting runner $NAME"...
peertube-runner server & sleep 5 && \
peertube-runner register --url $URL --registration-token $TOKEN --runner-name $NAME && \
wait