Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
litestream-s6-example
Discontinued Example repository for building a multi-process Docker container.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
My tool is called LogPaste. It allows users to generate shareable URLs for text files. I use it in my open-source KVM over IP device so that users can easily share diagnostic logs with me.
# Build LogPaste from source RUN go build \ -mod=readonly \ -v \ -o /app/server \ ./main.go # Download Litestream executable RUN wget "https://github.com/benbjohnson/litestream/releases/download/v${litestream_version}/${litestream_deb_filename}"
A few months ago, I saw that Ben Johnson, author of the popular Bolt database, had taken on a new project: Litestream. It's a simple, open-source tool that replicates a SQLite database to Amazon's S3 cloud storage.
The minor hack is in that trailing &. It tells the script to run the Litestream process in the background, which is how I can execute two long-running processes in the same Docker container. Ben Johnson has published a cleaner solution, but I'm using the hacky version for ease of demonstration.
litestream-s6-example: A more advanced and robust method for running Litestream alongside your app in a Docker container. It uses s6-overlay to restart the Litestream instance on failure.
I'm using LogPaste in production for TinyPilot, my open-source KVM over IP device. Because users run my software on devices they own, I can't see any diagnostic information when they report issues. LogPaste provides a convenient way for users to share their logs with me.
Sharing text files isn't exactly revolutionary, but serverless data replication might be. Here's a demo of me migrating my LogPaste app server between two separate hosting platforms: Heroku and fly.io. There's no database server or data migration step, but all of my data persists between platforms: