Deploy Medusa Backend to Railway Difficulty creating an administrator and his password
I did everything according to the documentation
https://docs.medusajs.com/deployments/server/deploying-on-railway
Then I went into the console and wrote
-railway login
-railway link
I chose the project I needed and its GitHub repository
wrote
railway shell
And entered the command from the documentation
railway run npx medusa user --email [email protected] --password supersecret
but nothing happens since all this happens locally as I understand it.
I am sure that this should work, I saw people here who work with this framework and set up a password.
Deploy Your Medusa Backend to Railway | Medusa
Learn step-by-step.
26 Replies
Project ID:
8b1e4ae6-f221-4948-a158-23868f94c7db
8b1e4ae6-f221-4948-a158-23868f94c7db
you have a error printout, please get that sorted
I took a workaround by adding this command.
She actually created the records that I needed.
But as I understand it, I have no connection with the database and radish.
Could you help me with this?
When I created the project I used the variables in the 2nd image
But I have these messages in the 3rd image
As far as I understand the links are correct
going forward please do not treat either the build or start command fields as just a place to run any arbitrary command, that is far from the proper use. you would have wanted to run that command locally though either
railway run
or railway shell
moving onOK, thank you.
But now I have entries in the database but cannot log in using the created password and user.
Problems connecting to the database?
your service variables look correct, but that doesn't mean those are the exact variables you are using in your code, so please show me how you are connecting to postgres in your code (we are going to work on one database at a time)
Also, in the same file.
Is this what you were asking about?
have you printed these environment variables to make sure they are correct?
printed ?
console.log
When deployed locally, everything was fine..
something is misconfigured somewhere, try to console log the environment variables
Okay, I'll try now.
But shouldn't there be an error here?
writes that Database initialized
somewhere redis is not configured
yes, I can configure it after.
The local project was without redis and all database connections worked
where are the postgres related errors?
I don't see them
And I don’t understand why I can’t log in with my username and password.
Which are already in the database
how have you confirmed that?
They are not in the log
im not sure how that quite answers the question
I'll try to solve it somehow. Thanks for your time
If I have entries in the data and these messages
So the database is connected, right?@Brody
it means migrations have been ran