fix: Create config.yaml for forgejo-runner daemon
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
9369fae559
commit
fbabdd0732
1 changed files with 14 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ spec:
|
|||
mountPath: /etc/docker/daemon.json
|
||||
subPath: daemon.json
|
||||
- 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
|
||||
readOnly: true
|
||||
resources:
|
||||
|
|
@ -114,6 +114,19 @@ spec:
|
|||
--name "$RUNNER_NAME" \
|
||||
--labels "$FORGEJO_RUNNER_LABELS"
|
||||
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
|
||||
volumes:
|
||||
- name: docker-config
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue