feat: bootstrap openclaw config and run gateway
- Remove debug sleep infinity mode - Add bootstrap logic: runs 'onboard --non-interactive' if config missing - Run gateway on port 18789 bound to 0.0.0.0 - Add containerPort declaration
This commit is contained in:
@@ -17,15 +17,26 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
serviceAccountName: openclaw
|
serviceAccountName: openclaw
|
||||||
|
|
||||||
# Debug mode (early bring-up): keep the pod running so we can exec in.
|
|
||||||
# We'll switch back to `openclaw gateway ...` once we confirm where the binary lives
|
|
||||||
# and how first-run config should be initialized.
|
|
||||||
containers:
|
containers:
|
||||||
- name: openclaw
|
- name: openclaw
|
||||||
image: default-route-openshift-image-registry.apps.lab.apilab.us/openclaw/openclaw:latest
|
image: default-route-openshift-image-registry.apps.lab.apilab.us/openclaw/openclaw:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
command: ["/bin/sh","-lc"]
|
command: ["/bin/sh", "-c"]
|
||||||
args: ["sleep infinity"]
|
args:
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
# Bootstrap if config doesn't exist
|
||||||
|
if [ ! -f ~/.openclaw/openclaw.json ]; then
|
||||||
|
node /app/openclaw.mjs onboard --non-interactive --accept-risk \
|
||||||
|
--gateway-port 18789 --gateway-bind custom \
|
||||||
|
--skip-daemon --skip-channels --skip-skills --skip-health --skip-ui
|
||||||
|
fi
|
||||||
|
# Run the gateway
|
||||||
|
exec node /app/openclaw.mjs gateway --port 18789 --bind 0.0.0.0
|
||||||
|
ports:
|
||||||
|
- name: gateway
|
||||||
|
containerPort: 18789
|
||||||
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
- name: HOME
|
- name: HOME
|
||||||
value: /home/node
|
value: /home/node
|
||||||
|
|||||||
Reference in New Issue
Block a user