Learn by example with our new example apps for Fly. We're starting off with databases, object storage, Git services, and event messaging and in the process we'll learn how to make any app Fly.
To build a modern application, you need to know how to take down your technical challenges in style. It's a style we call Appkata! Over the coming weeks, we'll be sharing with you the moves you need to deploy apps onto Fly that let you build faster. This week we kick off with four apps for your backend that give you a fast key/value database, an accessible S3 storage node, your own private Git server and a lightweight, powerful event-driven messaging server.
We already have a Redis on Fly, but this Redis is all your own to run in whatever region or regions you need it in. It gives you complete control of the server and makes features like pubs available. This first Redis example shows how you build on existing Docker images and can customize them for better performance of Fly. It also shows how to use the Volumes feature of Fly to add persistent storage to your Redis so it can be restarted and recover like nothing had happened.
Talking about the persistent storage that Volumes offer got us to thinking that we should expose that directly to the world, and what better way than turning it into an S3-compatible object store (yes, yes, there are better ways, but everyone knows how to use S3). For this we reached for MinIO, a free software implementation of the S3 platform. In this Appkata example, we set up a single node for MinIO with an attached persistent volume and access it over Fly's TLS edge connections, through the web for admin and through the MinIO client.
Another way to expose persistent storage, if you wave your hands abstractly enough, is Git which is more typically thought of some sort of source code control system. One of the lightest ways to get a useful Git service is with the open-sourced Gogs server, designed to be as painless as possible. The Appkata example for Gogs shows how you can deploy it, using its SQLite3 database option and Fly's volumes, to have your own private Git server, with issue tracker, web hooks and other modern development essentials, up and running in no time.
Messaging between apps and devices makes your Appkata style flow smoothly. Now, you can use Redis to pass messages, but there's plenty of other messaging platforms about which have easily accessible pubs and quality of service features. One of those is MQTT, a protocol developed for Internet of Things applications which is also at home connecting apps. We've put together an Appkata example which uses Mosquitto, an open source MQTT broker, and brings it online with TLS-encrypted connections and user/password authentication, all backed by a Fly Volume so the broker can persist messages when things are busy or slow.
So, there are four example apps, each of which can be used as part of your app fighting style. We'll be adding new examples and building on these examples over the coming weeks.
If you follow the links to community.fly.io, you will see that our new community site is a great place to ask questions, look for hints and tips and get your Fly apps running at their best. If you have a Fly account, sign in today. It's easy as we've enabled single sign-on between Fly and the community site making it simple to participate.