a year ago
Getting annoying error not letting me run railway run python [manage.py](manage.py) createsuperuser locally.
It's saying
django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: Name or service not knownFull trace attached.
13 Replies
a year ago
44413aa3-4701-4299-bbbf-9317ef96b304
a year ago
Railway run does not SSH into the host machine. It only copies the environment variables from the host machine to your local environment
a year ago
a year ago
Ok but how do I use the terminal on the server to run the commands I need to?
a year ago
Theoretically what I did should work no? https://discord.com/channels/713503345364697088/1254964970953773227/1255014080176066661
a year ago
I understand that it does still with environment variables and whatever from my local machine, but I'd like / need to run the command as if I'm on the machine 😅 I'm just trying to create a superuser on my Django app. If there was a way to use terminal directly from the website I would use it. I don't know how else to connect to the database from my local machine.
a year ago
@Brody has made some progress with SSH, but at the moment the official stance is that it's not possible.
The Railway Django Template may have some resources for you
a year ago
Well, that helped me with a staticfiles issue, but I need help actually getting the command that seemed to work on previous projects but isn't working now to run django commands.
Please, specifically, I have an issue connecting with the database.
I can use whatever environment variable, as there are more environment variables than just database_url there, so what do I have to do to be able to run this command? I don't need "ssh" necessarily, I just need whatever commands I run on my local machine to allow my script to be able to connect with the database. Is it the Database public url?
Please, let me know SPECIFICALLY what to change and how to fix it. I gave you the project id. Can't you look?
a year ago
I am not a member of the team, I cannot view your projects. This server is primarily community support. Support from the team is only available for Pro plan, or if the conductors deem a question fit for the team (billing, etc).
Your demanding attitude is not appreciated. I will leave you with the docs for the pre deploy step, after that you are on your own. https://docs.railway.com/guides/pre-deploy-command
a year ago
as well as the docs for databases. https://docs.railway.com/guides/databases
a year ago
Hi Adam! I thought you were part of the team lmao. My bad! I thought conductor meant you were a team member lol.
a year ago
Thanks for the help then!
a year ago
!s
Status changed to Solved adam • 12 months ago