problems with deploy
Anonymous
TRIALOP

2 years ago

I don't know what's happening that won't let me deploy my server

0 Replies

Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

you have your Google client id and key in a .env file in a public repo, please go and re-generate them


brody
EMPLOYEE

2 years ago

after that's done we will tackle deploying both frontend and backend onto railway properly


Anonymous
TRIALOP

2 years ago

delete them, they are useless


brody
EMPLOYEE

2 years ago

okay whatever works for you


brody
EMPLOYEE

2 years ago

can you show me a screenshot of your railway project just so I know what we are working with


Anonymous
TRIALOP

2 years ago

Yes, do you need the project configuration in railway?


brody
EMPLOYEE

2 years ago

a screenshot will suffice for right now, I'll of course have more questions as we go


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

I have the start command in npm run start, the build command is empty, and the path is server


Anonymous
TRIALOP

2 years ago

I have two because I was trying various things in different


brody
EMPLOYEE

2 years ago

two is needed because you have both a backend and a frontend


Anonymous
TRIALOP

2 years ago

Yes, but the front is the least important thing, the important thing is the backend and the database


Anonymous
TRIALOP

2 years ago

because the only thing I can't connect now is that


brody
EMPLOYEE

2 years ago

fair enough, but there are some very big pitfalls people (including you) will run into when deploying the frontend how you have it currently, but yes let's do the backend first


brody
EMPLOYEE

2 years ago

do you have all the needed database variables setup on the service?


Anonymous
TRIALOP

2 years ago

Before I had everything set up, but I accidentally deleted the railwey server and I don't remember how to configure it, that's why I have this problem now haha


Anonymous
TRIALOP

2 years ago

yes, PORT y DB_DEPLOY


Anonymous
TRIALOP

2 years ago

DB_DEPLOY = URL


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

remove the PORT variable, not sure whats thats doing there


Anonymous
TRIALOP

2 years ago

ok


brody
EMPLOYEE

2 years ago

can you explain your start script to me?
npm run server && npm run api


brody
EMPLOYEE

2 years ago

it should just be node index.js


Anonymous
TRIALOP

2 years ago

It was an old code and I left it as it was and added that last bit to test if it worked


Anonymous
TRIALOP

2 years ago

that they recommend that you accommodate


brody
EMPLOYEE

2 years ago

okay, please make the change i suggested


Anonymous
TRIALOP

2 years ago

ready


brody
EMPLOYEE

2 years ago

remove the start command you have set in the service settings please


Anonymous
TRIALOP

2 years ago

ready


brody
EMPLOYEE

2 years ago

set the root directory to /server


Anonymous
TRIALOP

2 years ago

ready


brody
EMPLOYEE

2 years ago

deploy the changes


Anonymous
TRIALOP

2 years ago

[Region: us-west1]

==============

Using Nixpacks

==============

context: 4a43c7f96e3e643f43d3cf9b92568d73

Nixpacks build failed

╔════════ Nixpacks v1.21.2 ═══════╗

║ setup │ nodejs18, npm-9x ║

║─────────────────────────────────║

║ start │ ║

╚═════════════════════════════════╝

Error: No start command could be found


brody
EMPLOYEE

2 years ago

retake this screenshot please


brody
EMPLOYEE

2 years ago

also, going forward, always use this to send logs please


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

not quite the same screenshot


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

you have not yet set a root directory


brody
EMPLOYEE

2 years ago

please do that


brody
EMPLOYEE

2 years ago

I think you set a watch path? please undo that, you need to set a root directory


Anonymous
TRIALOP

2 years ago

ready


brody
EMPLOYEE

2 years ago

retake this screenshot please


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

okay looks like it's deploying


Anonymous
TRIALOP

2 years ago

Thank you very much, everything works again, I have a question about this:
npm WARN config production Use --omit=dev instead.

server@1.0.0 start

node index.js

Model loaded:

Model loaded:

Model loaded:

Model loaded:

Model loaded:

Associations defined.

Server listening on port: 5849


Anonymous
TRIALOP

2 years ago

Everything is fine, it's just that, but I want to know if it could become a problem later on.


Anonymous
TRIALOP

2 years ago

it would be the npm thing


brody
EMPLOYEE

2 years ago

that warning?


brody
EMPLOYEE

2 years ago

it's truly of no concern


Anonymous
TRIALOP

2 years ago

Thank you very much, if it weren't for your help I would have gone bald from stress


Anonymous
TRIALOP

2 years ago

jaja


brody
EMPLOYEE

2 years ago

well we still need to do the frontend, because as it stands, you're about to deploy a development server, that's going to be costly and have terrible performance


Anonymous
TRIALOP

2 years ago

okay, let's check it


brody
EMPLOYEE

2 years ago

okay after dinner


Anonymous
TRIALOP

2 years ago

Okey perfect


Anonymous
TRIALOP

2 years ago

If you want, send me the request and write to me privately when you are ready.


Anonymous
TRIALOP

2 years ago

but mention me and I will come


brody
EMPLOYEE

2 years ago

rename that failed service to something that relates to your frontend, it is going to be the frontend service now


Anonymous
TRIALOP

2 years ago

okey


brody
EMPLOYEE

2 years ago

and then a screenshot of when thats done please


Anonymous
TRIALOP

2 years ago

But does railwey serve to build a front end?


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

you are skipping steps here, railway does not serve anything itself, railway is going to run your start script, and your start script starts a development server


Anonymous
TRIALOP

2 years ago

do we use vercel?


brody
EMPLOYEE

2 years ago

heck no, we shill railway here


Anonymous
TRIALOP

2 years ago

sorry


brody
EMPLOYEE

2 years ago

theres ways to do nearly everything, so lets get railway to run a production grade server instead


brody
EMPLOYEE

2 years ago

first off, do you have any start or build commands set in the frontend service?


Anonymous
TRIALOP

2 years ago

I think if npm run build, it compiles everything with webpack


brody
EMPLOYEE

2 years ago

that is correct, we just have to have a way to serve those files, and we will do so like this

copy the nixpacks.toml and Caddyfile from this repo into your client folder


Anonymous
TRIALOP

2 years ago

Client or Server?


brody
EMPLOYEE

2 years ago

client


Anonymous
TRIALOP

2 years ago

ready


brody
EMPLOYEE

2 years ago

push the changes


Anonymous
TRIALOP

2 years ago

ready


brody
EMPLOYEE

2 years ago

let me know if something goes wrong


Anonymous
TRIALOP

2 years ago

okey


Anonymous
TRIALOP

2 years ago

I think everything turned out well


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

open it up


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

haha i meant open the frontend's domain


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

working now?


Anonymous
TRIALOP

2 years ago

the console shows that, but the link doesn't show anything


brody
EMPLOYEE

2 years ago

send the link please



brody
EMPLOYEE

2 years ago

it works?


Anonymous
TRIALOP

2 years ago

now yes


Anonymous
TRIALOP

2 years ago

haha


brody
EMPLOYEE

2 years ago

great!


Loading...