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 -
"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)"
a year ago
during build?
DB_CONNECTION="mariadb"
DB_HOST="database.railway.internal"
DB_PORT="3306"
DB_DATABASE="cvr-api"
DB_USERNAME="root"
DB_PASSWORD="7aj6hwcmcbwq83u5"a year ago
because the private network is not available during the build, please read the guide to see how to get around that
"
You will need to bind to a IPv6 port to receive traffic on the private network.
"
a year ago
no, please read the entire guide
a year ago
please do not skim read -
found in his read.me on github
a year ago
you do not need to use the public url, that is purely for example
a year ago
have you followed the guide?
a year ago
lets see your scripts
#!/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 --forcea year ago
okay and have you told railway to run that as the start script?
for some reason on hist github his is start.sh
a year ago
ill talk with the creator
a year ago
you are using the public url
a year ago
of course
a year ago
but its not going to work with how you currently have it setup
a year ago
its working with the public url
a year ago
the private url is not going to work with how you currently have it setup
a year ago
^
a year ago
you can use the public url for now
a year ago
Did this get you up and running using the private url?



