From ff7dccfe76fad7a448770158aabc33de1469f691 Mon Sep 17 00:00:00 2001 From: AB-UK Date: Sat, 7 Mar 2026 21:46:16 +0000 Subject: [PATCH] Fix ai-dock ComfyUI port binding --- k8s/apps/comfyui/deployment.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/k8s/apps/comfyui/deployment.yaml b/k8s/apps/comfyui/deployment.yaml index 8c2fba5..41d34d2 100644 --- a/k8s/apps/comfyui/deployment.yaml +++ b/k8s/apps/comfyui/deployment.yaml @@ -26,13 +26,24 @@ spec: # Fix permissions mismatch usually happening when mapping host paths securityContext: runAsUser: 0 + initContainers: + - name: create-data-dir + image: busybox + command: ["sh", "-c", "mkdir -p /host.data && chown -R 1000:1000 /host.data"] + volumeMounts: + - name: data + mountPath: /host.data containers: - name: comfyui image: ghcr.io/ai-dock/comfyui:latest-cuda imagePullPolicy: IfNotPresent env: - - name: CLI_ARGS - value: "--listen 0.0.0.0 --port 8188" + - name: COMFYUI_FLAGS + value: "--listen 0.0.0.0" + - name: COMFYUI_PORT_LOCAL + value: "8188" + - name: COMFYUI_PORT_HOST + value: "8189" ports: - containerPort: 8188 name: http