createsuperuser with sqlite
I have a low priority django app that just uses a sqlite db instead of postgres so I have a volume attached to my service for it.
Locally I have linked the service, but when I try and run
railway run python manage.py createsuperuser
I get errors.
django.db.utils.OperationalError: unable to open database file
Far as I can tell there is no way to run anything directly on the service, which really sucks because that seems to be why this isn't working.Solution:Jump to solution
some kind of logic that creates a superuser from environment variables if a superuser account doesnt already exist
14 Replies
Project ID:
2299c72c-3f0b-4b23-9a78-e606aad6bd60
2299c72c-3f0b-4b23-9a78-e606aad6bd60
Far as I can tell there is no way to run anything directly on the service, which really sucks because that seems to be why this isn't working.Correct, thats why its always best to go with postgres
I have no need for a full on database though and don't really want to pay for one when all I need is sqlite.
then your app would need to be able to create its own superuser account
Solution
some kind of logic that creates a superuser from environment variables if a superuser account doesnt already exist
Ahhhh yeah I’ve done that once before… Forgot about that. Thanks
Hey while you’re here… The $5 plan specifies it comes with $5 of usage, does the $20 plan come with $20 of usage or $5?
it doesn't come with any usage 😬
It says all hobby plan features though and hobby plan says $5 included…
yeah it's a bit misleading depending on how you interpret that sentence
Yeah seems like a pretty big gray area there… Might want to reword it or specify it somehow for legalese purposes..
personally I don't regard credits as a feature
but yeah definitely could be worded better
I found a comment on this thread
https://help.railway.app/feedback/allow-ssh-access-to-containers-via-cli-e4985f6f
that say that ability to connect directly to the containers is planned, any idea when it might come about?
You're in on that thread too 😮
Railway Help Station
Allow SSH access to containers via CLI
I have a project that works in my local environment but not once pushed to Railway. If I could login to the container like I can locally, I could determine what the differences are that are causing the problem. Add a function like the "connect" command in the CLI to connect to the actual container.
no ETA sorry