Azu𝕏orce@シノン教
Azu𝕏orce@シノン教
RRailway
Created by Azu𝕏orce@シノン教 on 6/25/2024 in #✋|help
Can't log in and my deploy has gone offline?
No description
7 replies
RRailway
Created by Azu𝕏orce@シノン教 on 7/27/2023 in #✋|help
Developer Plan - Is there a no-subscription plan?
Hello, I used to have purchased some credits and then was using Railway always below $5, and thus in principle I only had to pay once and could use it for my low consuming apps. Now, it seems that I had to upgrade my plan, so I bought another $10 credits to keep my apps running. However, I was wondering if I would have to keep paying monthly just to run my <$3 total apps...? I'm not sure if I could/should continue if I would have to pay monthly for those apps... Thanks in advance!
24 replies
RRailway
Created by Azu𝕏orce@シノン教 on 11/25/2022 in #✋|help
Path of a Nixpacks (google-chrome, chromedriver) [Python]
Hello, with the latest update I could install google-chrome and chromedriver using Nixpacks by adding a railway.json file like this (in case other people are interested):
{
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"providers": ["...", "python"],
"phases": {
"setup": {
"nixPkgs": ["...", "google-chrome", "chromedriver"]
}
}
}
}
}
{
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"providers": ["...", "python"],
"phases": {
"setup": {
"nixPkgs": ["...", "google-chrome", "chromedriver"]
}
}
}
}
}
Now in order to use Selenium to webscrape (with permission), I would need to point it to the google-chrome and chromedriver path, but where is it located? How do I get access to it? (In my directories there's just a .nix file btw) Specifically, what should I write instead of '[full-google-chrome-path]' and '[full-chromedriver-path]' in the following situation:
from selenium import webdriver
GOOGLE_CHROME_PATH = '[full-google-chrome-path]'
CHROMEDRIVER_PATH = '[full-chromedriver-path]'
op = webdriver.ChromeOptions()
op.binary_location = GOOGLE_CHROME_PATH
op.add_argument('--headless')
op.add_argument('--disable-gpu')
op.add_argument('--no-sandbox')
op.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=op)
from selenium import webdriver
GOOGLE_CHROME_PATH = '[full-google-chrome-path]'
CHROMEDRIVER_PATH = '[full-chromedriver-path]'
op = webdriver.ChromeOptions()
op.binary_location = GOOGLE_CHROME_PATH
op.add_argument('--headless')
op.add_argument('--disable-gpu')
op.add_argument('--no-sandbox')
op.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=op)
Thanks!
9 replies
RRailway
Created by Azu𝕏orce@シノン教 on 11/20/2022 in #✋|help
Is it possible to unlink the credit card for a credit-based sub?
Hello, I'm liking Railway so far (despite still not being able to get chromedriver/google-chrome installed yet), so I was thinking of buying a credit-based subscription to unlock the developer plan and getting unlimited execution hours. I have a few questions before buying it though: 1. Just to make sure, I still get the $5 credit per month for free right? Meaning if I buy $5 (paid) credits, and they haven't been touched on that month yet, I would start every new month with $5 (free) + $5 (paid credit) in the developer plan, right? 2. Since paypal isn't accepted, but mainly just credit card (I don't have prepaid cards etc), is it possible to unlink the credit card afterwards? I feel uncomfortable having it linked. It pretty much looks like having the usage-based subscription and I'm scared that if I somehow do a mistake the usage getting spiked up such that I get charged per usage. 3. Is it basically a lifetime developer plan as long as I have >$0 paid credit in the balance? Edit: 4. If I purchase $5 credit (or was it 10?), does my friend get the referral bonus? Or does it have to be from usage-based sub? Thanks!
3 replies
RRailway
Created by Azu𝕏orce@シノン教 on 11/17/2022 in #✋|help
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
from selenium import webdriver
GOOGLE_CHROME_PATH = '/app/.apt/usr/bin/google-chrome'
CHROMEDRIVER_PATH = '/app/.chromedriver/bin/chromedriver'
op = webdriver.ChromeOptions()
op.binary_location = GOOGLE_CHROME_PATH
op.add_argument('--headless')
op.add_argument('--disable-gpu')
op.add_argument('--no-sandbox')
op.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=op)
[...]
from selenium import webdriver
GOOGLE_CHROME_PATH = '/app/.apt/usr/bin/google-chrome'
CHROMEDRIVER_PATH = '/app/.chromedriver/bin/chromedriver'
op = webdriver.ChromeOptions()
op.binary_location = GOOGLE_CHROME_PATH
op.add_argument('--headless')
op.add_argument('--disable-gpu')
op.add_argument('--no-sandbox')
op.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=op)
[...]
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!
9 replies