Oren
Explore posts from serversCaddy with NextJS app running pages router.
I had the same problem but it got away in 2 minutes, problem was the deployment was marked as finished but actually build was finished and I could see nextjs was building pages under observability logs, once that was done it worked great
5 replies
cant deploy Postgres S3 Backup template
this is my slightly modified template https://github.com/orenaksakal/backup-cron-railway one time backup script which you can set to run through railway cronjob to run for cost optimization (almost 0 cost). Also you can name your backups like db name so its easier to distinguish if you hold multiple db backups at the same bucket
101 replies
Deploy a nextjs app to railway??
yeap my app uses app router, api routes, server components and server actions without any problems you can see the whole stack at https://nextedgestarter.com
13 replies
Deploy a nextjs app to railway??
I switched my nextjs app from vercel to railway without problems, here is my setup
- 1 project 3 services on railway 1 postgresql, 1 nextjs app, 1 db backup script on cronjob -> cost of this is around $1.5/m for me traffic is around 200 people a day.
- using cloudflare r2, images, dns, proxy, cdn, cache, mail forwarding analytics (its all free, images is $5/m)
- you can continue using Image component from nextjs but better to host all images on cloudflare to reduce egress and for faster delivery
- remember to use private database url to connect your app to your db to reduce egress
- disable image optimization with flags and remove sharp library -> which would reduce your ram usage 3x (nextjs keeps images in memory if you don't so, there is an open github issue on their side)
Another option I'm still experimenting with is flightcontrol as I've received some aws credits ($1000/2years) but its definately is 5-10x more expensive when you are out of credits say 2 years later.
13 replies