| .forgejo-disabled/workflows | ||
| .helix | ||
| .sqlx | ||
| assets | ||
| migrations | ||
| nix | ||
| src | ||
| vendor/axum-oidc | ||
| .dockerignore | ||
| .env.sample | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Dioxus.toml | ||
| Dockerfile | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
Art from outer space
Self-hosted booru for small communities. Doesn't scale and hopefully doesn't need to.
Simple and straightforward, and quite definitely too much so! All files are stored on disk (with a CAS-like tree structure because much like most beings, I fear the unknown), everything else is stored in a single SQLite file.
For my small deployments, this has proven to be incredible. Searches are so fast they feel client-side. Computers are pretty fast, you probably don't need kubernetes and fancy databases.
Authentication is currently done through OpenID Connect because that's what I have already set up for other stuff. This is currently the only option because I'm the only user, let me know if you'd like something less annoying than having to set up Authentik.
Features include:
- Mass uploading, just drag all your files and see them go (not as cool as copyparty though).
- Mass tagging, so you can clear your "huge_breasts" backlog all at once.
- An annoying footer about its unfinished status (soon gone?)
Deploying
Just build the docker container and yeet it somewhere, I personally do something like this:
services:
afos:
image: git.fromouter.space/hamcha/afos
restart: unless-stopped
volumes:
- data:/data
- uploaded:/uploaded
env_file:
- .env
...
You will need to provide env values, look at .env.sample for what's required and what's optional, every env variable has a description attached!
Developing
Copy .env.sample to .env (it's gitignore'd), fill the missing env vars if you wanna test fancy things like OIDC authentication locally.
This command gets all the dependencies and starts a server with hot reload:
dx serve
A nix flake is provided for compiling and setting up the environment with the correct version of dioxus and all required dependencies. Just nix develop and you should be good to go!
Before committing, remember to run this command to generate a sqlx cache so CI can compile (if you added migrations/queries):
cargo sqlx prepare -- --features server
License
AGPL-3.0-only
This software uses a modified version axum-oidc crate, which is licensed under MPLv2, provided under vendor/axum-oidc. Find the original source here