anonymous message site to me :3
https://qna.gayest.dev
- Rust 58.5%
- CSS 21.8%
- HTML 18.7%
- Dockerfile 1%
| .sqlx | update offline sqlx | |
| .woodpecker | add ci | |
| assets | allow deleting questions | |
| migrations | initial commit | |
| src | prevent deleting questions without auth | |
| templates | allow deleting questions | |
| .containerignore | add docker support | |
| .gitignore | initial commit | |
| Cargo.lock | add timestamps | |
| Cargo.toml | add timestamps | |
| compose.yml | use from scratch | |
| Containerfile | use from scratch | |
| Cross.toml | add Cross.toml | |
| LICENSE | initial commit | |
| nouns.txt | initial commit | |
| readme.md | add documentation | |
q&a
anonymous message site to me :3
installation
qna has an oci image built for both linux/amd64 and linux/arm64.
there are no image tags yet
docker run \
-e DATABASE_URL=... \
-e PASSWORD_HASH=... \
-p 3000:3000 \
codeberg.org/vineyard/qna:latest
building from source
qna is written in rust and so can be built with
cargo build --release
the executable is built with templates and assets compiled into the binary. the crate can be built statically using musl
cargo build --release --target x86_64-unknown-linux-musl
config
all configuration is done through environmental variables
DATABASE_URL- postgresql database connection string (postgres://username:password@ip/database) (required)PASSWORD_HASH- argon2 password hash (required)BIND_ADDR- ip address to bind to (default:0.0.0.0:3000)MAX_QUESTION_SIZE- maximum characters in a question (default:1024)MAX_CW_SIZE- maximum characters in a content warning (default:1024)
ntfy
all the following fields are optional if ntfy isn't wanted. sends notification when a question is asked
NTFY_INSTANCE- ntfy instance url (default:https://ntfy.sh)NTFY_PRIORITY- ntfy notification priority (default:3)NTFY_TOPIC- ntfy topic
fedi
assumes the fedi instance supports mastodon's api. posts answered questions to fedi account
FEDI_INSTANCE- instance urlFEDI_TOKEN- api tokenFEDI_CW- cw to go alongside response (default:anonymous question)FEDI_VISIBILITY- visibility to post as (default:unlisted, supports:public,unlisted,private)