1.3 KiB
1.3 KiB
ushort
ushort is a compact, self-contained URL shortener written in Rust and backed
by SQLite. It serves an embedded web interface and JSON API from a single
statically linked executable.
It supports deployment at either a dedicated host such as s.example.com or
under a path such as example.com/s. Images are available for Linux AMD64 and
ARM64.
Quick start
Requirements: Docker with the Compose plugin.
cp config.example.toml config.toml
# Set a private api_key in config.toml.
mkdir -p data
USHORT_UID="$(id -u)" USHORT_GID="$(id -g)" \
docker compose -f deploy/docker-compose.build.yml up --build -d
The example starts ushort at http://localhost:18082/s/ and stores its SQLite
database in ./data/urlshort.db.
Check it and stop it with:
curl http://localhost:18082/s/api/health
docker compose -f deploy/docker-compose.build.yml down
For a production server, use the published image through
deploy/docker-compose.prod.yml; it does not build or require a source
checkout.