- Add CloudronManifest.json with app metadata - Create Dockerfile with multi-stage build - Install Google Chrome (Chrome for Testing) since Ubuntu Noble doesn't have chromium package - Install required Chrome dependencies (libatk, libgtk, etc.) - Add start.sh script with Xvfb setup for headless Chrome - Copy entire Chrome installation directory for proper resource access - Add .gitignore and update README with installation instructions
31 lines
830 B
Bash
Executable File
31 lines
830 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
# Create necessary directories for Chromium crash reports
|
|
# Cloudron mounts /app/data as a volume - try to create dirs, but don't fail if we can't
|
|
mkdir -p "/app/data/chromium/Crash Reports/pending" 2>/dev/null || true
|
|
|
|
# Set environment variables for Chromium
|
|
export DISPLAY=:99
|
|
# Ensure /usr/bin is in PATH so chromium is found before snap wrappers
|
|
export PATH="/usr/bin:/usr/local/bin:$PATH"
|
|
|
|
# Clean up any stale Xvfb lock files
|
|
rm -f /tmp/.X99-lock
|
|
|
|
# Start Xvfb for headless Chrome
|
|
Xvfb :99 -screen 0 1600x1200x24 -ac +extension GLX +render -noreset &
|
|
|
|
# Wait for Xvfb to be ready
|
|
sleep 2
|
|
|
|
echo "Starting FlareSolverr..."
|
|
|
|
# Change to FlareSolverr directory and start
|
|
cd /app/code/flaresolverr
|
|
|
|
# Run FlareSolverr (same as official Dockerfile: python -u flaresolverr.py)
|
|
exec python3 -u flaresolverr.py
|
|
|