fix: restore HAPPY_HOME_DIR to PVC so settings survive pod restarts #19

Merged
cpfarhood merged 1 commits from fix/happy-home-dir into main 2026-02-20 18:22:33 +00:00
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ githubRepo: ""
# Happy Coder endpoints # Happy Coder endpoints
happyServerUrl: "https://happy.farh.net" happyServerUrl: "https://happy.farh.net"
happyWebappUrl: "https://happy-coder.farh.net" happyWebappUrl: "https://happy-coder.farh.net"
happyHomeDir: "/workspace/.happy" happyHomeDir: "/home/user/.happy"
happyExperimental: "true" happyExperimental: "true"
# VNC display # VNC display
+3 -4
View File
@@ -63,10 +63,9 @@ chown "$RUN_UID:$RUN_GID" "$HOME"
# so no sudo needed — Happy/Claude Code will find credentials in the correct home dir. # so no sudo needed — Happy/Claude Code will find credentials in the correct home dir.
echo "Starting Happy Coder..." echo "Starting Happy Coder..."
# HAPPY_HOME_DIR is in /workspace (emptyDir), so it is always fresh on pod start. # Remove stale lock file. HAPPY_HOME_DIR lives on the home PVC so it survives
# Remove the lock file as a safety net in case daemon start is called more than # pod restarts — without this cleanup the daemon refuses to start after a crash.
# once within the same container lifetime. rm -f "${HAPPY_HOME_DIR:-$HOME/.happy}/daemon.state.json.lock"
rm -f "${HAPPY_HOME_DIR:-/workspace/.happy}/daemon.state.json.lock"
cd "$WORKSPACE_DIR" cd "$WORKSPACE_DIR"
happy daemon start || echo "Happy Coder daemon failed to start, continuing anyway..." happy daemon start || echo "Happy Coder daemon failed to start, continuing anyway..."