2
0
Fork
You've already forked qna
0
anonymous message site to me :3 https://qna.gayest.dev
  • Rust 58.5%
  • CSS 21.8%
  • HTML 18.7%
  • Dockerfile 1%
2025年03月02日 21:48:03 -08:00
.sqlx update offline sqlx 2025年02月21日 19:04:21 -08:00
.woodpecker add ci 2025年02月19日 20:36:31 -08:00
assets allow deleting questions 2025年02月21日 17:54:05 -08:00
migrations initial commit 2025年02月19日 19:59:11 -08:00
src prevent deleting questions without auth 2025年03月02日 21:48:03 -08:00
templates allow deleting questions 2025年02月21日 17:54:05 -08:00
.containerignore add docker support 2025年02月19日 20:21:32 -08:00
.gitignore initial commit 2025年02月19日 19:59:11 -08:00
Cargo.lock add timestamps 2025年02月21日 16:59:09 -08:00
Cargo.toml add timestamps 2025年02月21日 16:59:09 -08:00
compose.yml use from scratch 2025年02月23日 19:26:15 -08:00
Containerfile use from scratch 2025年02月23日 19:26:15 -08:00
Cross.toml add Cross.toml 2025年02月23日 18:28:14 -08:00
LICENSE initial commit 2025年02月19日 19:59:11 -08:00
nouns.txt initial commit 2025年02月19日 19:59:11 -08:00
readme.md add documentation 2025年02月23日 17:42:57 -08:00

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 url
  • FEDI_TOKEN - api token
  • FEDI_CW - cw to go alongside response (default: anonymous question)
  • FEDI_VISIBILITY - visibility to post as (default: unlisted, supports: public, unlisted, private)