Issam
Can't setup a Laravel app with Nixpacks
I have a Laravel app that works well when using Heroku buildpacks.
When I build Nixpacks and launch the site, I get this error:
The /app/bootstrap/cache directory must be present and writable.
I tried changing the Build Command to this npm run prod && php artisan cache:clear && composer dump-autoload && chmod -R 777 storage/
(which I found on Stack Overflow), when launching the site, I get this error instead: copy(/app/app/Console/Commands/ChartMakeCommand.php): Failed to open stream: Permission denied
Any idea on how to solve this?10 replies
Extremely slow querying to an external database
So I noticed that when I use Railway's database service, my app is quite fast.
When I switch to my database string to use an external database hosted on Amazon RDS in us-west (N. California), loading any page takes 1000-3000ms.
Of course I do expect the querying to be slower than using Railway's on-site database. But this level of latency is insane.
Any idea on what's causing this?
2 replies
Is it possible to change the region of an app?
I don't see an option that allows to specify the region where an app will be deployed. where are apps deployed by default?
context: I just deployed an app to Railway. it was painfully slow (like 10x slower than on Heroku), at first I thought that the server had by default calculator-level resources.
Eventually I decided to try out the Railway databases, I set up a MySQL database and migrated all my data to it. then switched the database string in the app so that it uses the newly created Railway database. Immediately the app became much faster.
My original database was on a AWS Frankfurt server. From the new connection string, it appears that Railway hosts somwhere on
us-west
, meaning that every query had to travel between continents, which led to the slowness of the app.
So is it possible to specify where the app will be deployed? as it is favorable to me to host in Europe.32 replies