Deploying laravel
definewater
HOBBYOP

a year ago

Hey railway team im having a hard time trying to build my laravel project with some extra build comands these are the commands "composer install && php artisan config:cache && php artisan event:cache && php artisan route:cache && php artisan optimize && php artisan migrate"

it says error but the error is not very helpful(look image attached)

Project id: 3eeeee07-630f-4d9a-8a7c-4d98d84e0d34

64 Replies

a year ago

I would recommend checking out our guide -


definewater
HOBBYOP

a year ago

"SQLSTATE[HY000] [2002] phpnetworkgetaddresses: getaddrinfo for database.railway.internal failed: Name or service not known (Connection: mariadb, SQL: select tablename as name, (datalength + indexlength) as size, tablecomment as comment, engine as engine, tablecollation as collation from informationschema.tables where tableschema = 'cvr-api' and tabletype in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)"


definewater
HOBBYOP

a year ago

how come the Database URL does not seem to connect


definewater
HOBBYOP

a year ago

any idea


a year ago

during build?


definewater
HOBBYOP

a year ago

DB_CONNECTION="mariadb"
DB_HOST="database.railway.internal"
DB_PORT="3306"
DB_DATABASE="cvr-api"
DB_USERNAME="root"
DB_PASSWORD="7aj6hwcmcbwq83u5"

definewater
HOBBYOP

a year ago

yea


definewater
HOBBYOP

a year ago

1300629809025650700


a year ago

because the private network is not available during the build, please read the guide to see how to get around that


definewater
HOBBYOP

a year ago

okay thank you sir


definewater
HOBBYOP

a year ago

"
You will need to bind to a IPv6 port to receive traffic on the private network.
"


definewater
HOBBYOP

a year ago

right


a year ago

no, please read the entire guide


definewater
HOBBYOP

a year ago

😭 i cant find what ur talking abotut bro


a year ago

please do not skim read -


definewater
HOBBYOP

a year ago

so i jsut used public url 😰


definewater
HOBBYOP

a year ago

dthat dont feel right


definewater
HOBBYOP

a year ago

1300638231280484400


definewater
HOBBYOP

a year ago

found in his read.me on github


a year ago

you do not need to use the public url, that is purely for example


definewater
HOBBYOP

a year ago

TCP PRXY?


definewater
HOBBYOP

a year ago

bro 😭


a year ago

have you followed the guide?


definewater
HOBBYOP

a year ago

yes ong what am i doing worng


a year ago

lets see your scripts


definewater
HOBBYOP

a year ago

i dont need all the scripts only run-app


definewater
HOBBYOP

a year ago

#!/bin/bash
# Make sure this file has executable permissions, run `chmod +x run-app.sh`

# Build assets using NPM
npm run build

# Clear cache
php artisan optimize:clear

# Cache the various components of the Laravel application
php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:cache
php artisan filament:optimize
php artisan filament:optimize-clear
php artisan storage:link
php artisan optimize



# Run any database migrations
php artisan migrate --force

definewater
HOBBYOP

a year ago

i mean dont think this is wrong i just addedd a few things


definewater
HOBBYOP

a year ago

filament and storage:link and optimize


a year ago

okay and have you told railway to run that as the start script?


definewater
HOBBYOP

a year ago

1300639757390577700


definewater
HOBBYOP

a year ago

yessir


definewater
HOBBYOP

a year ago

for some reason on hist github his is start.sh


definewater
HOBBYOP

a year ago

1300640066821034000


definewater
HOBBYOP

a year ago

he dont have the one in the article


a year ago

ill talk with the creator


definewater
HOBBYOP

a year ago

imma copy his and try again


definewater
HOBBYOP

a year ago

from github


definewater
HOBBYOP

a year ago

lol


definewater
HOBBYOP

a year ago

switch to ur mariadb template and works



definewater
HOBBYOP

a year ago

we up gangy


a year ago

you are using the public url


definewater
HOBBYOP

a year ago

yea


definewater
HOBBYOP

a year ago

should i do private instead


a year ago

of course


definewater
HOBBYOP

a year ago

okidoki


a year ago

but its not going to work with how you currently have it setup


definewater
HOBBYOP

a year ago

its working wdym


definewater
HOBBYOP

a year ago

what are you seeing that im not 👀


a year ago

its working with the public url


definewater
HOBBYOP

a year ago

yea im changing it now


a year ago

the private url is not going to work with how you currently have it setup


definewater
HOBBYOP

a year ago

oh you right im in the same circle


definewater
HOBBYOP

a year ago

💀


definewater
HOBBYOP

a year ago

bro im so cooked 3 am


definewater
HOBBYOP

a year ago

i just wanted to do this for fun now im dying insde


a year ago

^


a year ago

you can use the public url for now


definewater
HOBBYOP

a year ago

okeeyy thanks


definewater
HOBBYOP

a year ago

for the help !


definewater
HOBBYOP

a year ago

Thank you @Prosper


definewater
HOBBYOP

a year ago

thanks


a year ago

Did this get you up and running using the private url?


Loading...