Help with setup of laravel cmds on project deployment

Hello everyone so im hosting a laravel rest api but i cant seem to access the terminal and run cmds to seed the database etc, i want to seed the database on every start up
P
Percy44d ago
Project ID: c93cd254-9d7c-42ba-ac53-835e0f60c9cc
F
Faith44d ago
c93cd254-9d7c-42ba-ac53-835e0f60c9cc
F
Faith44d ago
No description
F
Faith44d ago
also now i get this issue for some reason
M
Medim44d ago
There's no terminal in railway nor SSH connection
F
Faith44d ago
ye i thought imma just do it in the build step
M
Medim44d ago
Yep, add migration command to the start command
F
Faith44d ago
but now im getting this issue and i dont seem to quite understand why it is doing it
M
Medim44d ago
Just be careful with the seeder since it will seed everytime u build
F
Faith44d ago
does it not wipe the databse on new deploys?
M
Medim44d ago
Seems like its Railway related, just try again No
F
Faith44d ago
aight imma try
M
Medim44d ago
Only if ur code does that, but Railway Dbs are persistent
F
Faith44d ago
tbh it just to host a quick thing not suppose to be useable alright i retried now lets see
F
Faith44d ago
No description
F
Faith44d ago
damn it usually dont take this long with my other servers it works now but it dont seem to run the migrations do i need to make a complete new build step for this?
M
Medim44d ago
run the migrations on the start command eg: run migration && run start
F
Faith44d ago

[build]
builder = "NIXPACKS"

[build]
buildCommand = "php artisan serve"

[deploy]
startCommand = "php artisan migrate && php artisan db:seed --class=TruckSeeder"

[build]
builder = "NIXPACKS"

[build]
buildCommand = "php artisan serve"

[deploy]
startCommand = "php artisan migrate && php artisan db:seed --class=TruckSeeder"
i did this @Medim i think this sis the same
F
Faith44d ago
No description
F
Faith44d ago
i did it in here
M
Medim44d ago
yes, its the same
F
Faith44d ago
aight bet its some how not working?
F
Faith44d ago
No description
F
Faith44d ago
i served it but it serves to port 8000 what port was it that railway expected it to serve on? i removed the start functions since i dont need them lets see what that does hehe
M
Medim44d ago
Do you have a PORT env var?
F
Faith44d ago
nawh do i need one but it worked before?
F
Faith44d ago
it works now
M
Medim44d ago
Then it just wasn't 'there yet'
F
Faith44d ago
No description
F
Faith44d ago
now im getting this issue wth
M
Medim44d ago
And I guess this issue didn't happen locally ?
F
Faith44d ago
nah
M
Medim44d ago
Hmm, I suspect your laravel app is missing some config for prod But I never used Laravel in my entire life
F
Faith44d ago
hmm maybe
M
Medim44d ago
So I don't think I can help u there :copium:
Want results from more Discord servers?
Add your server
More Posts
Postgres Database private url, is it faster and how to use it?I have a Django rest framework setup with postgress db and it seems the connection is slow. I noticumami deployment fails since migration of railwayHi there, I hope you can help me. I am not too well with backend (database, docker, etc) programminIs Go 1.22 supported yet?I remember getting deployment issues when trying to support Go 1.22 in the past. I assume it's a matIs Go 1.22 supported yet?I remember getting deployment issues when trying to support Go 1.22 in the past. I assume it's a matmy plan is 5$My plan is 5$ why I pay now 51$. ?? Please deactivate my account I don't need this server in which eFile too large on Gitlab CI/CDHi, i'm trying to add a CI/CD to my project but the deploy part always fail saying ```File too largeCan't find my repo on railwayIt was recently migrated to be a organization repo that I have admin access to. How do I deploy baseDeploying to Railway from Gitlab CI/CDwhere to get project token from project serviceApp Crashed - Resource temporarily unavailableMy backend nodejs app crashed multiple times today. could not find the root cause. this has not hapDatabase server does not connectGood afternoon, I have already made all the connections with the postgreSQL database server but whenDeploy logs stopped appearing after a manual redeployHi, I have a project running several services. Deploy logs for one of the services randomly stopped ENOTFOUND redis.railway.internalFirst time using railway. I'm on team plan which says it supports private networking. I have a simplError: libuuid.so.1: cannot open shared object file: No such file or directoryGetting this error with puppeteer on Railway. ``` node:internal/modules/cjs/loader:1239 return pro"Error: connection already closed."I keep getting this error message when I attempt to update a user in my PostgreSQL database. I do noUnable to update Variables in App. (First Update after Migration)Hey Guys, my App tries to connect to the old containers of my postgres and redis. I checked the variImage Storagehello everyone, can I use Postgresql to store the images which my users upload in django-project?Setup Cloudflare Proxy1. Clicked "custom domain". 2. Railway pops up a CNAME for me to add to Cloudflare. 3. Add CNAME recDirectus: impossible to update or to run the old versionProject ID : 9be34f5b-fa35-49c1-83c5-f0fbd245db9b Template : https://github.com/kadumedim/directus-sCSV files in storage/app/data/csv not accessible?Hello, I've setup a laravel api on railway. I have a seeder that tries to load csv files from the I have not touched my project in several weeks but at midnight railway reverted to a very old versioI'm very confused it looks like my project was deployed last night, although I have not touched it i