lazyatom / dokku-chrome Goto Github PK
View Code? Open in Web Editor NEWA headless chrome service for dokku
A headless chrome service for dokku
Hello! I'm using Watir with dokku chrome and so far it's amazing. But I have an issue of how to store the download files or change the default. I enable a storage folder on the app that is linked to store the files. Any help will be appreciated.
An example of how I'm running the test:
chrome_url = ENV['CHROME_URL']
@download_directory = Rails.env.production? ? "#{Rails.root.to_s}/storage" : "#{Rails.root.to_s}/tmp"
prefs = {
'download' => {
'default_directory' => @download_directory,
'prompt_for_download' => false,
'directory_upgrade' => true,
},
}
args = [ '--headless', '--no-sandbox']
@browser = Watir::Browser.new(:chrome, options: {prefs: prefs, args: args}, url: "#{chrome_url}/webdriver")
@browser.goto "https://www.dwsamplefiles.com/?dl_id=176"
Probably a long-shot question... the Readme isn't clear on how dokku-chrome
is not supposed to be used. So I'd like to clarify.
I have a Rails web app running inside dokku, the web app has webdrivers
and watir
(which basically is built on top of Selenium) in Gemfile. When the web app runs, it tries to open a headless Chrome browser to read a web page. But even after installing dokku-chrome
, the app would throw this error: "Failed to find Chrome binary". So is dokku-chrome
supposed to provide a Chrome binary inside dokku? If not, any idea how a Chrome binary could be installed in dokku?
Appreciate any pointer.
I am trying to access chrome executable to work. Is there any way I can get BROWSER_PATH
for the chrome installed ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.