fix(paperless-ai): write token to /tmp as fallback (PVC mount perms)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user