At Sylt.ing, we need article cover images that are permanent, fast, and don't rely on third-party CDN services. The answer? A self-hosted SeaweedFS S3 cluster.

Why SeaweedFS?
SeaweedFS is an open-source distributed storage system that's S3-compatible. We run it as four Docker containers — master, volume, filer, and S3 gateway — on a Contabo VPS with 24GB RAM. It's lightweight, fast, and costs nothing beyond the server itself.

The Pipeline
When an article is created, Grok Imagine generates a cover image. The temp URL is downloaded and uploaded to our SeaweedFS S3 bucket via the S3 API. The permanent URL is stored in the article database and served through an Apache reverse proxy on the Sylt.ing server.

The Proxy Layer
Port 8888 on the SeaweedFS host is blocked by the firewall, so we set up an autossh tunnel from the Sylt.ing server to the storage host. Apache proxies /storage/ through the tunnel to the filer. Visitors get the image on standard HTTPS with zero extra infrastructure.

Why Not Puppeteer?
The old approach used Puppeteer to log into the CMS, navigate to the blog form, and upload the image through the file input. It was fragile — a single CSS class change would break the whole pipeline. Direct database insertion + SeaweedFS is faster, more reliable, and costs zero browser automation overhead.
At Sylt.ing, we need article cover images that are permanent, fast, and don't rely on third-party CDN services. The answer? A self-hosted SeaweedFS S3 cluster.Why SeaweedFS?SeaweedFS is an open-source distributed storage system that's S3-compatible. We run it as four Docker containers — master, volume, filer, and S3 gateway — on a Contabo VPS with 24GB RAM. It's lightweight, fast, and costs nothing beyond the server itself.The PipelineWhen an article is created, Grok Imagine generates a cover image. The temp URL is downloaded and uploaded to our SeaweedFS S3 bucket via the S3 API. The permanent URL is stored in the article database and served through an Apache reverse proxy on the Sylt.ing server.The Proxy LayerPort 8888 on the SeaweedFS host is blocked by the firewall, so we set up an autossh tunnel from the Sylt.ing server to the storage host. Apache proxies /storage/ through the tunnel to the filer. Visitors get the image on standard HTTPS with zero extra infrastructure.Why Not Puppeteer?The old approach used Puppeteer to log into the CMS, navigate to the blog form, and upload the image through the file input. It was fragile — a single CSS class change would break the whole pipeline. Direct database insertion + SeaweedFS is faster, more reliable, and costs zero browser automation overhead.
How We Built a Self-Hosted Image Pipeline with SeaweedFS
At Sylt.ing, we need article cover images that are permanent, fast, and don’t rely on third-party CDN services. The answer? A self-hosted SeaweedFS S3 cluster -- and this entire website is powered by AI from start to finish.Why SeaweedFS?SeaweedFS is an open-source distributed storage system that’s S3-compatible. We run it as four Docker containers -- master, volume, filer, and S3...
Like
1
0 Σχόλια 0 Μοιράστηκε 2χλμ. Views 0 Προεπισκόπηση