Chromedriver and Chrome in Nixpacks for Selenium (python)
Hello,
I'm migrating to Railway from Heroku. So far Railway is superior, however, I'm still missing one feature which is likely to be possible, but I need some help to implement it there:
In Heroku I've been using heroku-buildpacks for the
chromedriver
and google-chrome
for Selenium (webscraping with permission), more specifically the following:
https://github.com/heroku/heroku-buildpack-chromedriver
https://github.com/heroku/heroku-buildpack-google-chrome
Used python like this
Now that I don't have the heroku-buildpacks anymore, what should I change?
I heard about Nixpacks and I've read a few things, but I still didn't quite get it.
Can anyone please help me setting it up, meaning specifically...
1. What file/code do I need to include to "install" chromedriver and chrome via Nixpacks with python?
2. How do I get the paths to include (as seen above in the code)? / What are the paths?
(Optional 3. Any other advice would be appreciated)
Thanks in advance!4 Replies
Project ID:
N/A
N/A
Not sure if I got the buildpacks "installed", but I simply added a
railway.json
file in the directory with the content:
I don't actually know if it was successful, but where (path) would that be located?
I would need to know where to point
these variables to...
Sorry, I'm totally new to NixpacksVery close! I think this is more what you are looking for
Note the phases object
Unfortunatley, I just tested it and I am running into a Nix install error due to the chrome package having a different license. That is something we can fix in Nixpacks itself though! (I'll let you know once it is implemented). In the meantime you can try installing any package with
apt-get
Awesome, thanks.
How do I install using
apt-get
?
using apt-get
instead of nixPkgs
?
Where would it be installed such that I can point the variable to?
I replaced
"nixPkgs"
with "aptPkgs"
to use apt-get
, but I get this error: