fix: persist Chrome profile data and settings across container restarts
- Add explicit --user-data-dir flag to Chrome wrapper to ensure profile data is stored in the persistent home directory - Add cont-init-home.sh script to properly initialize home directory structure on container startup with correct permissions - Ensure Chrome config directory exists before Chrome starts - Bump chart version to 0.1.13 This fixes the issue where Chrome loses authentication and settings after pod restarts by explicitly managing where Chrome stores its profile data. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Initialize persistent home directory structure for the app user
|
||||
# This ensures Chrome settings and SSH keys persist across pod restarts
|
||||
|
||||
echo "=== Initializing persistent home directory ==="
|
||||
|
||||
# Ensure the user home directory exists with proper ownership
|
||||
if [ ! -d "/home/user" ]; then
|
||||
echo "Creating /home/user directory..."
|
||||
mkdir -p /home/user
|
||||
chown app:app /home/user
|
||||
fi
|
||||
|
||||
# Ensure critical directories exist for persistent data
|
||||
echo "Ensuring persistent directories exist..."
|
||||
mkdir -p /home/user/.config
|
||||
mkdir -p /home/user/.ssh
|
||||
mkdir -p /home/user/.cache
|
||||
|
||||
# Set proper ownership for all directories
|
||||
chown -R app:app /home/user
|
||||
|
||||
# Ensure SSH directory has proper permissions
|
||||
chmod 700 /home/user/.ssh
|
||||
|
||||
echo "Home directory initialization complete"
|
||||
Reference in New Issue
Block a user