fix: Create config.yaml for forgejo-runner daemon
All checks were successful
sync-to-forgejo / sync (push) Successful in 9s
All checks were successful
sync-to-forgejo / sync (push) Successful in 9s
The runner was failing because it expected /data/config.yaml to exist. Now creating the config file before starting the daemon.
This commit is contained in:
parent
1f3a90ad99
commit
67b1911c47
1 changed files with 14 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ spec:
|
||||||
mountPath: /etc/docker/daemon.json
|
mountPath: /etc/docker/daemon.json
|
||||||
subPath: daemon.json
|
subPath: daemon.json
|
||||||
- name: registry-cert
|
- name: registry-cert
|
||||||
mountPath: /etc/docker/certs.d/registry.nxtgauge.com/ca.crt
|
mountPath: /etc/docker/certs.d/ci.nxtgauge.com/ca.crt
|
||||||
subPath: registry.crt
|
subPath: registry.crt
|
||||||
readOnly: true
|
readOnly: true
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -114,6 +114,19 @@ spec:
|
||||||
--name "$RUNNER_NAME" \
|
--name "$RUNNER_NAME" \
|
||||||
--labels "$FORGEJO_RUNNER_LABELS"
|
--labels "$FORGEJO_RUNNER_LABELS"
|
||||||
echo "Starting daemon..."
|
echo "Starting daemon..."
|
||||||
|
# Create config.yaml for daemon
|
||||||
|
if [ ! -f /data/config.yaml ]; then
|
||||||
|
cat > /data/config.yaml << CONFIGEOF
|
||||||
|
log:
|
||||||
|
level: info
|
||||||
|
runner:
|
||||||
|
file: .runner
|
||||||
|
daemon:
|
||||||
|
container:
|
||||||
|
network: host
|
||||||
|
privileged: true
|
||||||
|
CONFIGEOF
|
||||||
|
fi
|
||||||
exec forgejo-runner daemon
|
exec forgejo-runner daemon
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-config
|
- name: docker-config
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue