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
64 Replies
2 years ago
I would recommend checking out our guide -
"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)"
2 years ago
during build?
DB_CONNECTION="mariadb"
DB_HOST="database.railway.internal"
DB_PORT="3306"
DB_DATABASE="cvr-api"
DB_USERNAME="root"
DB_PASSWORD="7aj6hwcmcbwq83u5"2 years 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.
"
2 years ago
no, please read the entire guide
2 years ago
please do not skim read -
2 years ago
you do not need to use the public url, that is purely for example
2 years ago
have you followed the guide?
2 years 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 --force2 years ago
okay and have you told railway to run that as the start script?
2 years ago
ill talk with the creator
2 years ago
you are using the public url
2 years ago
of course
2 years ago
but its not going to work with how you currently have it setup
2 years ago
its working with the public url
2 years ago
the private url is not going to work with how you currently have it setup
2 years ago
^
2 years ago
you can use the public url for now
2 years ago
Did this get you up and running using the private url?



