fix(paperless-ai): write token to /tmp as fallback (PVC mount perms)

This commit is contained in:
2026-09-14 23:58:41 +09:00
parent 0edd6bc73a
commit 7e91262257
+10 -3
View File
@@ -28,6 +28,9 @@ spec:
initContainers:
- name: fetch-llm-token
image: curlimages/curl:8.12.0
securityContext:
runAsUser: 0
fsGroup: 0
command:
- sh
- -c
@@ -52,9 +55,13 @@ spec:
fi
# Store token in file for main container to read
mkdir -p /app/data
echo "$TOKEN" > /app/data/llm_token.txt
echo "[init] Token fetched and stored successfully"
# Write to both locations for compatibility
mkdir -p /tmp/llm-token /app/data 2>/dev/null || true
echo "$TOKEN" | tee /tmp/llm-token/llm_token.txt > /dev/null 2>&1
echo "$TOKEN" > /app/data/llm_token.txt 2>/dev/null || true
echo "[init] Token fetched and stored"
[ -f /tmp/llm-token/llm_token.txt ] && echo " -> /tmp/llm-token/llm_token.txt"
[ -f /app/data/llm_token.txt ] && echo " -> /app/data/llm_token.txt"
env:
- name: LLM_AUTH_CLIENT_SECRET
valueFrom: