cement/README.md

44 lines
1.6 KiB
Markdown

# cement - a super light-weight pastebin
<picture>
<source media="(prefers-color-scheme: dark)" srcset="media/masked-screenshot.png">
<source media="(prefers-color-scheme: light)" srcset="media/masked-screenshot.png">
<img alt="Screenshot of Cement displaying a paste" src="media/masked-screenshot.png">
</picture>
---
Cement is a very simple pastebin-like web application written in [Rust]. It provides a very minimal interface intended to be as intrusion-free as possible. There's no admin or login required.
- Written in [Rust] using the [Poem] web framework
- Stores pastes in an [SQLite] database
- Styled using [Tailwind CSS]
- Includes support for syntax highlighting via [highlight.js]
- Builds to a tiny Docker [image](https://hub.docker.com/r/blakerain/cement) (under 6 MB)
# Running in Docker
A [Docker] container is provided at [blakerain/cement]. This container will run Cement on port 3000.
```
docker run --name my-cement -d blakerain/cement
```
You can specify the SQLite database using the `DB` environment variable. For example, if you have mounted a volume under `/data` into which the database should be stored as `cement.db`, you can set the `DB` environment variable to `sqlite:///data/cement.db`:
```
docker run -d \
--name my-cement \
-e DB=sqlite:///data/cement.db \
-v cement_data:/data
```
[Rust]: https://rust-lang.org/
[Poem]: https://github.com/poem-web/poem
[Sqlite]: https://sqlite.org/
[Tailwind CSS]: https://tailwindcss.com/
[highlight.js]: https://highlightjs.org/
[Docker]: https://www.docker.com/
[blakerain/cement]: https://hub.docker.com/r/blakerain/cement