Deploy Medusa Backend to Railway Difficulty creating an administrator and his password

beryberykz
HOBBY

a year ago

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 admin@medusa-test.com --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.

0 Replies

beryberykz
HOBBY

a year ago

8b1e4ae6-f221-4948-a158-23868f94c7db


a year ago

you have a error printout, please get that sorted


beryberykz
HOBBY

a year ago

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

1217700846305939500
1217700846633091000
1217700846893269000


beryberykz
HOBBY

a year ago

As far as I understand the links are correct

1217701402185302000
1217701402428833800
1217701402697011200


a year ago

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


a year ago

moving on


beryberykz
HOBBY

a year ago

OK, 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?


a year ago

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)


beryberykz
HOBBY

a year ago

1217703178330443800


beryberykz
HOBBY

a year ago

Also, in the same file.
Is this what you were asking about?

1217706113764692000


a year ago

have you printed these environment variables to make sure they are correct?


beryberykz
HOBBY

a year ago

printed ?


a year ago

console.log


beryberykz
HOBBY

a year ago

When deployed locally, everything was fine..


a year ago

something is misconfigured somewhere, try to console log the environment variables


beryberykz
HOBBY

a year ago

Okay, I'll try now.
But shouldn't there be an error here?
writes that Database initialized

1217708172131958800


a year ago

somewhere redis is not configured


beryberykz
HOBBY

a year ago

yes, I can configure it after.
The local project was without redis and all database connections worked


a year ago

where are the postgres related errors?


beryberykz
HOBBY

a year ago

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


a year ago

how have you confirmed that?


beryberykz
HOBBY

a year ago

They are not in the log


a year ago

im not sure how that quite answers the question


beryberykz
HOBBY

a year ago

I'll try to solve it somehow. Thanks for your time


beryberykz
HOBBY

a year ago

If I have entries in the data and these messages
So the database is connected, right?@Brody

1217739865605804000
1217739865861390300


a year ago

it means migrations have been ran