Skip to content

pushcx/caddy-sqlite-fs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fork kludged to act as a passthrough cache. Original README follows.


SQLite FS plugin for Caddy

Warning

I whipped this up quickly as a proof of concept. It is experimental and likely has bugs.

This package implements a virtual file system for Caddy using SQLite.

It expects a path to a SQLite database with at least this table in its schema:

CREATE TABLE IF NOT EXISTS "files" (
	"name" TEXT PRIMARY KEY, -- full file path compliant with: https://pkg.go.dev/io/fs#ValidPath
	"content" BLOB,          -- file bytes
	"modified" INTEGER,      -- unix timestamp of last modification
	"mode" INTEGER           -- file mode
);

It can be used like so in the Caddyfile:

file_server /database/* {
	fs sqlite data.sql
}

Note

This is not an official repository of the Caddy Web Server organization.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.3%
  • Shell 3.7%