services: mongodb: image: 'mongo:latest' container_name: 'mongodb' restart: always ports: - '27017:27017' command: ["mongod", "--bind_ip_all"] volumes: - b4_mongodb_data:/data/db networks: - backend healthcheck: test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping')"] interval: 10s timeout: 5s retries: 3 proxy-hub: image: 'galaxyeye88/proxy-hub:latest' container_name: 'proxy-hub' ports: - '8192:8192' profiles: ["proxy"] # ✅ Only start when profile=proxy, e.g., docker compose --profile proxy up restart: unless-stopped browser4: image: 'galaxyeye88/browser4:latest' container_name: 'browser4' depends_on: mongodb: condition: service_healthy environment: DEEPSEEK_API_KEY: ${DEEPSEEK_API_KEY} PROXY_ROTATION_URL: ${PROXY_ROTATION_URL} BROWSER_CONTEXT_MODE: DEFAULT # Check documentation for other modes BROWSER_CONTEXT_NUMBER: 2 # Ignore this if BROWSER_CONTEXT_MODE is set to DEFAULT BROWSER_MAX_OPEN_TABS: 8 # Ignore this if BROWSER_CONTEXT_MODE is set to DEFAULT BROWSER_DISPLAY_MODE: HEADLESS GORA_MONGODB_SERVERS: mongodb:27017 SPRING_DATA_MONGODB_URI: mongodb://mongodb:27017/browser4 SERVER_PORT: 8182 SERVER_ADDRESS: 0.0.0.0 ports: - '8182:8182' command: ["--bind_ip_all"] networks: - backend ulimits: nofile: soft: 65535 hard: 65535 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8182/actuator/health"] interval: 30s timeout: 10s retries: 3 restart: unless-stopped networks: backend: driver: bridge name: browser4_backend volumes: b4_mongodb_data: