Skip to content

Conversation

@olesho
Copy link
Contributor

@olesho olesho commented Sep 26, 2025

No description provided.

@olesho olesho requested a review from tysonthomas9 September 26, 2025 14:26
@tysonthomas9 tysonthomas9 requested review from Copilot and removed request for tysonthomas9 September 27, 2025 01:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for persistent Chromium data storage to enable retaining browser profiles locally across container restarts. The changes configure a volume mount system that allows Chromium user data, profiles, and cache to persist on the host filesystem.

Key changes:

  • Adds configurable Chromium data persistence through CHROMIUM_DATA_HOST environment variable
  • Removes hardcoded --user-data-dir from Chromium flags to allow dynamic configuration
  • Updates Docker configuration to support optional volume mounting for browser data

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
run-local.sh Implements volume mounting logic for persistent Chromium data and removes hardcoded user data directory
docker-compose.yml Updates image tag and adds optional volume mount for Chromium data persistence
Makefile Adds help documentation and environment variable support for data persistence
Dockerfile.local Creates /data directory structure and declares volume for Chromium data mounting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

run-local.sh Outdated

# Add Chromium data volume if specified
if [[ -n "$CHROMIUM_DATA_VOLUME" ]]; then
RUN_ARGS+=( $CHROMIUM_DATA_VOLUME )
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable $CHROMIUM_DATA_VOLUME should be quoted to prevent word splitting. Change to \"$CHROMIUM_DATA_VOLUME\".

Suggested change
RUN_ARGS+=( $CHROMIUM_DATA_VOLUME )
RUN_ARGS+=( "$CHROMIUM_DATA_VOLUME" )

Copilot uses AI. Check for mistakes.
run-local.sh Outdated
# Local-friendly Chrome flags (less restrictive than cloud) + custom DevTools frontend
export CHROMIUM_FLAGS="--user-data-dir=/home/kernel/user-data --disable-dev-shm-usage --start-maximized --remote-allow-origins=* --no-sandbox --disable-setuid-sandbox --custom-devtools-frontend=http://localhost:8001/"
# Note: --user-data-dir will be set automatically by start-chromium.sh using CHROMIUM_DATA_DIR
export CHROMIUM_FLAGS="--disable-dev-shm-usage --start-maximized --remote-allow-origins=* --no-sandbox --disable-setuid-sandbox --custom-devtools-frontend=http://localhost:8001/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this? because it will create security issue if we allow these.

  - ✅ Chrome version and all 41 profile files persist across restarts
  - ✅ Can customize location with CHROMIUM_DATA_HOST
  - ✅ Can disable with CHROMIUM_DATA_HOST=""
  - ✅ Docker-compose works with env var or default
@tysonthomas9
Copy link
Contributor

@claude

@olesho olesho merged commit 2253697 into main Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants