max-te / droplet

A sidecar to deploy tarballs into a volume. Written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

droplet is a tiny Rust application whose sole purpose is to receive tarballs as HTTP PATCH requests and unpack them into a specified directory. This application is intended to be used as a sidecar via which your pipelines can deploy files for a static site. This can be done by having it share a volume with a server such as static-web-server.

droplet includes no authorization mechanism, so make sure it's only reachable from trusted systems.

Configuration

droplet is configured through these environment variables:

Variable default Description
DROPLET_ADDRESS 0.0.0.0:3000 The socket adress on which to listen for http requests
DROPLET_TARGET_DIR /target The directory into which tarballs are unpacked
DROPLET_AUTH_BEARER If set, require HTTP Beare Authorization with the given token.

Interface

Say droplet is running on localhost:3000 then sending a PATCH with an uncompressed tarball body to any path on that adress will unpack the tar into the target directory. E.g. with httpie:

http patch localhost:3000/ < archive.tar

About

A sidecar to deploy tarballs into a volume. Written in Rust.


Languages

Language:Rust 82.7%Language:Dockerfile 17.3%