there is an issue regarding file transfer...
Hi, Railways is awesome. I managed to deploy my app. However, when i am trying to transfer files from railway to dropbox it doesn't seem to work. The file runs fine on my laptop. Do you think it could be a firewall issue? Any help or suggestion would be great! Thanks
40 Replies
Project ID:
5cb9ecaa-5bde-4beb-b7a3-5653ad5269a3
5cb9ecaa-5bde-4beb-b7a3-5653ad5269a3
the command i am using in docker CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 8080 && python to_dropbox.py"]
fastapi app runs fine as expected
but to_dropbox.py doesn't
any err messages?
no error messages infact i don't have anything in logs i tried to print some statements just to see if it enters the function but nothing on logs
i only have fastapi related logs
hmm
try changing your docker file to this:
now add another file in that same directory with the dockerfile and name it run.sh
this is the code inside the run.sh:
what this does basically is the same as the CMD statement, but doing it subsequently instead of together
oh got it
i think it should work let me try and update you so basically you are starting uvicorn first and once it starts then you start the other script in the background right?
that's right
by the way, if it still doesnt work, you can try putting the sleep statement to a longer time, to wait the server to start fully
it seems to work thanks!
just one more thing i have purchased the developer plan
how do i upgrade ram?
@JerZ I think you guys upgrade it automatically right?
based on the number of requests and current usage
yes, your cpu, ram, and all other upgrades are automatically upgraded to your project
so i have no option to set the maximum for let's say 4 gb
i mean it is fine even if it is not there but i guess having such would be great as we can do horizontal scaling after let's say a certain amount of resources
by the way @JerZ thanks for your immediate responses
I believe not, but if I'm not mistaken you can set a maximum limit of credits to your usage
np, I don't touch grass
sorry wrong info, the devs are currently working on a feature called "relative billing", which allows you to implement project spend limits. This feature should be available in June
ππ»
this isnβt true, unless you know something I donβt
Bro I received an email about a changelog that says that
project spend limits aren't being released in June. They're planned, but it's nowhere near ready
The billing cycle change started today. That's it
understood, thank you for bringing this to my attention
hey
can i disturb you once more?
Is there a way to get approximate geolocation?
just need country
geo location for what? a user or your service?
for user π
ah, there are various api services that provide you with a geo location for a given IP, but I would recommend against that because an external call to get a user location adds a good amount of extra latency to the end users request.
(assuming you are wanting to get the location before a response is returned to the user)
what I would recommend is have your code download the maxmind free database, and use a maxmind library to get the location of an IP from looking it up in the local database.
(use this method if you need to get the location before returning data to the user, but if getting the location of a user is a background task, the first method is fine)
yeah i downloaded a dataset and using that
just wanted to know if there is a better way
using the local maxmind database definitely is the most efficient way possible
actually i am a ml guy but doing frontend and backend for my appπ
some tips, you would need to trust the proxy, since the request ip would be coming from a railway proxy and not the end user.
have your code download the database to a volume, and only download it if it doesn't exist or is X amount of days out of date, that way you won't have to redownload it on every deployment
i set --forwarded-allow-ips='*' and then get host not sure i am just testing if it works you are right. i just need to get the location once so i can show the pricing according to that.
it is very tiring i have got 500+ downloads for my app, i just released a week ago but alone it is very difficult sometimes i wish i hadn't started or i just sell it
by the way your knowledge regarding deployments and backend seems really good
thank you, I've been helping around this server for a while now, and I used to manage servers for a small company, so I know a few things lol
is it possible to connect with you on linkedin, only if you are okay. I won't message you with my problems there, i promise only here π
i dont have a linkedin
oh no worries then and thanks again friend! this is the app not sure it would work in your country haven't open worldwide but this is what i was working on https://play.google.com/store/apps/details?id=com.aispeak.version1
AISpeak - Apps on Google Play
Supercharge your IELTS practice and elevate your English language proficiency
lol wat
oh it is just a word
i don't promote it π
i know the word but thats dark lol
ik ik its just funny
was tired of working for companies so thought let me try something for myself
hell yeah, i like the idea a lot
thanks! it is just i am alone. yeah i felt it has potential
thanks for your help. see you later
cya later, if you have any more questions feel free to ask π
hi
sorry to disturb again
just a quick question
can i have multiple projects in hobby plan
if yes can each project have 8 gb ram?
yes and yes