For the sake of others
MySQL is not part of Ghost’s docker image, so you need to install it separately, when doing that you realize the real issue: MySQl8 needs a lot more RAM than fly.io offers and what most hosting platforms offer. Bare minimum one seemingly needs 2GB RAM
Conclusion: Hosting Ghost on fly.io’s (free tier) is no longer an option (PlanetScale is NOT an option for Ghost)
Thanks, but as per my comment above. Even if connections are fixed, the real issue is fly.io 's RAM offer does not allow for a MySQL8 deployment (one needs a minimum of 2GB RAM). Sadly. And PlanetScale is not an option for Ghost. fly.toml for Ghost with MySQL - #2 by patfly
For this reason (mainly because of RAM requirements for MySQL8) a fly.io build can’t even be tried on the free tier. Let alone run in production which is sad given a bunch of ghost tutorials online are guiding people to fly.io only for one to realize later it won’t work. Conclusion: One can no longer host Ghost in fly.io’s free tier.
Many thanks for the clarity @Curiositry . I appreciate all help.
Got something else earlier today that I’m stuck with.
I’ve added a custom domain and all good with that, I’m having issues with the metadata passed on to Google, Twitter, Facebook (located in Settings → Site Meta settings). My custom domain is not beeing passed on in that case, everywhere meta data is passed on my url shows up as being the appname.fly.dev domain (and not my custom domain).
I’ve tried setting up an env url in fly.toml to deal with that but no luck so far.
You may just need to re-deploy in order to get Ghost to “restart” (which may make it recognize the domain). That guess is based on this.
Sometimes that kind of error is related to the app not picking up reverse-proxy related HTTP headers such a X-Forwarded-For but I don’t think the hostname is usually picked up incorrectly in those cases (usually it’s more like generated URL’s use http:// instead of https://).
Struggling to get the Ghost/Signup/transactional emails to work (working with the Mailgun integration since it is the default one), by only setting up Mailgun details in Ghost dashboard I get “Failed to send magic link email” See screenshot:
Thanks for the pointer! Appreciated.
For others reading this in the future: I’ve managed to get the mail variables through as environment variables via secrets (and not via fly.toml).
So, for those struggling, here they come: