Deploying laravel
definewater
HOBBYOP

2 years 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

Closed

64 Replies

2 years ago

I would recommend checking out our guide -


definewater
HOBBYOP

2 years ago

"SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for database.railway.internal failed: Name or service not known (Connection: mariadb, SQL: select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'cvr-api' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)"


definewater
HOBBYOP

2 years ago

how come the Database URL does not seem to connect


definewater
HOBBYOP

2 years ago

any idea


2 years ago

during build?


definewater
HOBBYOP

2 years ago

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

definewater
HOBBYOP

2 years ago

yea


definewater
HOBBYOP

2 years ago

1300629809025650719


2 years ago

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


definewater
HOBBYOP

2 years ago

okay thank you sir


definewater
HOBBYOP

2 years ago

"

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

"


definewater
HOBBYOP

2 years ago

right


2 years ago

no, please read the entire guide


definewater
HOBBYOP

2 years ago

😭 i cant find what ur talking abotut bro


2 years ago

please do not skim read -


definewater
HOBBYOP

2 years ago

so i jsut used public url 😰


definewater
HOBBYOP

2 years ago

dthat dont feel right


definewater
HOBBYOP

2 years ago

1300638231280484454


definewater
HOBBYOP

2 years ago

found in his read.me on github


2 years ago

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


definewater
HOBBYOP

2 years ago

TCP PRXY?


definewater
HOBBYOP

2 years ago

bro 😭


2 years ago

have you followed the guide?


definewater
HOBBYOP

2 years ago

yes ong what am i doing worng


2 years ago

lets see your scripts


definewater
HOBBYOP

2 years ago

i dont need all the scripts only run-app


definewater
HOBBYOP

2 years 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

2 years ago

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


definewater
HOBBYOP

2 years ago

filament and storage:link and optimize


2 years ago

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


definewater
HOBBYOP

2 years ago

1300639757390577664


definewater
HOBBYOP

2 years ago

yessir


definewater
HOBBYOP

2 years ago

for some reason on hist github his is start.sh


definewater
HOBBYOP

2 years ago

1300640066821034035


definewater
HOBBYOP

2 years ago

he dont have the one in the article


2 years ago

ill talk with the creator


definewater
HOBBYOP

2 years ago

imma copy his and try again


definewater
HOBBYOP

2 years ago

from github


definewater
HOBBYOP

2 years ago

lol


definewater
HOBBYOP

2 years ago

switch to ur mariadb template and works



definewater
HOBBYOP

2 years ago

we up gangy


2 years ago

you are using the public url


definewater
HOBBYOP

2 years ago

yea


definewater
HOBBYOP

2 years ago

should i do private instead


2 years ago

of course


definewater
HOBBYOP

2 years ago

okidoki


2 years ago

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


definewater
HOBBYOP

2 years ago

its working wdym


definewater
HOBBYOP

2 years ago

what are you seeing that im not 👀


2 years ago

its working with the public url


definewater
HOBBYOP

2 years ago

yea im changing it now


2 years ago

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


definewater
HOBBYOP

2 years ago

oh you right im in the same circle


definewater
HOBBYOP

2 years ago

💀


definewater
HOBBYOP

2 years ago

bro im so cooked 3 am


definewater
HOBBYOP

2 years ago

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


2 years ago

^


2 years ago

you can use the public url for now


definewater
HOBBYOP

2 years ago

okeeyy thanks


definewater
HOBBYOP

2 years ago

for the help !


definewater
HOBBYOP

2 years ago

Thank you @Prosper


definewater
HOBBYOP

2 years ago

thanks


2 years ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...