R
Railway4mo ago
Devmoha

Deployment Crashed

my app keeps crushing although i did every step is this railway.app problem
49 Replies
Percy
Percy4mo ago
Project ID: 2b8a7d9a-d2eb-4e7b-9094-052aa0dbe7fb
Devmoha
Devmoha4mo ago
2b8a7d9a-d2eb-4e7b-9094-052aa0dbe7fb
Brody
Brody4mo ago
i'm going to need some more information, why is it crashing?
Devmoha
Devmoha4mo ago
the problem was my was django but the project service provider was nodejs i changed to python but why did this happened the problem was my "app" was django
Brody
Brody4mo ago
node is detected when you have a package.json file plenty of reasons why a django app could have a package.json, and nixpacks does it best to attempt to deploy a wide variety of apps, but unfortunately that means it wont be able to deploy every kind of project, some projects would need a little bit of extra config
Devmoha
Devmoha4mo ago
i am getting FileNotFoundError: [Errno 2] No such file or directory: '/app/media/archives/Aato_Gadid_Saami.docx', when i upload media file and i want to download it , is there extra steps i need to do to make sure file upload is served correctly on railway , on my django app everything is setup correctly
Brody
Brody4mo ago
how big is that docx file?
Devmoha
Devmoha4mo ago
its notary docx files mostly 200kb up to ~200 kb not always
Brody
Brody4mo ago
this would be a config issue with your app, do you have a url handler setup to serve that file?
Devmoha
Devmoha4mo ago
yes media files is being handled
Brody
Brody4mo ago
lets see your urls.py file please
Devmoha
Devmoha4mo ago
here is urls.py project level
No description
Brody
Brody4mo ago
what is the MEDIA_URL set to?
Devmoha
Devmoha4mo ago
No description
Brody
Brody4mo ago
you likely need to use a regex path as shown here - https://github.com/vinfehring/django-volumes/blob/master/mysite/urls.py#L27
Devmoha
Devmoha4mo ago
like this and then i will push to github and see if it solves right ?
No description
Brody
Brody4mo ago
looks good at first glace, let me know if that works
Devmoha
Devmoha4mo ago
do i need to create volume or anything else
Brody
Brody4mo ago
if you want the files to persist between deployments, yes
Devmoha
Devmoha4mo ago
of course i need the files to be persistant can you guide how to do it please
Brody
Brody4mo ago
try mounting a volume to /app/media
Devmoha
Devmoha4mo ago
what is volume ? i dk how to create it in railway
Devmoha
Devmoha4mo ago
i can't move a way from here i click the volume and i paste /app/media/ it just skips back to this same screen
No description
Brody
Brody4mo ago
have you tried typing out the text?
Devmoha
Devmoha4mo ago
i just copy pasted /app/media also when i tried typing while i am typing it just skips back
Brody
Brody4mo ago
i am unable to reproduce, right click your service to attach a volume
Devmoha
Devmoha4mo ago
which url path should i be may be i am in the wrong screen
Brody
Brody4mo ago
you are in the project canvas, that is correct
Devmoha
Devmoha4mo ago
first when i right click it show my project is this right
No description
Brody
Brody4mo ago
that is called a service, click it and then enter the path
Devmoha
Devmoha4mo ago
it did worked for me now it created volume but it just loading till now
No description
Brody
Brody4mo ago
there is no volume there?
Devmoha
Devmoha4mo ago
you see that applying changes .....
Devmoha
Devmoha4mo ago
its done right ?
No description
Brody
Brody4mo ago
assuming it was mounted at the correct location, yes
Devmoha
Devmoha4mo ago
Access to XMLHttpRequest at 'https://notary-api-v2.up.railway.app/auth/token/login/' from origin 'https://notary-ui-v2.up.railway.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource., sorry new error , before everything was working its cors i know but idk why it happening although i set everything correct
Devmoha
Devmoha4mo ago
No description
Devmoha
Devmoha4mo ago
seems the api is down
Devmoha
Devmoha4mo ago
do you think its cause of the media path we gave to the volume ?
No description
Brody
Brody4mo ago
no, try to redeploy
Devmoha
Devmoha4mo ago
i think its time to wait untill its up ?
No description
Brody
Brody4mo ago
are you sure that is the correct domain?
Devmoha
Devmoha4mo ago
network settings
No description
Devmoha
Devmoha4mo ago
why its still in progress deployment although its active
No description
Brody
Brody4mo ago
just a ui bug
Devmoha
Devmoha4mo ago
still error : Not Found The train has not arrived at the station. Please check your network settings to confirm that your domain has provisioned. If you are a visitor, please let the owner know you're stuck at the station. Request ID: GokiIyUCRge7xm82vdQx4Q_2823689937, what is wrong
Devmoha
Devmoha4mo ago
still problem not solved
No description
Want results from more Discord servers?
Add your server