2025-02-06 23:01:38 +01:00
2025-01-29 15:20:07 +01:00
2025-03-23 20:23:58 +01:00
2025-04-25 00:55:22 +02:00
2024-06-23 11:12:53 +02:00
2025-04-24 20:02:18 +02:00
2024-12-19 23:15:06 +01:00
2025-04-24 20:02:18 +02:00
2025-04-22 18:49:11 +02:00
2024-07-23 14:00:53 +02:00
2025-02-05 22:00:03 +01:00

Getting started with developing

  1. Clone the repository.
  2. Install and configure Postgresql. Create a new database for brass: createdb brass.
  3. TODO: Configure DB name, DB user & pass, DB connection string, ...
  4. Install sqlx-cli: cargo install sqlx-cli
  5. Migrate the database: sqlx database setup
  6. Create superuse: cargo r -- createadmin

Useful stuff

  • cargo-watch, cargo-add
  • mailtutan

Example Deployment OpenBSD

#!/bin/ksh

DATABASE_URL=postgresql://brass:pw@localhost/brass
SECRET_KEY=""
HOSTNAME="brass.tfld.de"
SERVER_ADDRESS="127.0.0.1"
SERVER_PORT="8081"
SMTP_SERVER="localhost"
SMTP_PORT="25"
SMTP_TLSTYPE="none"
ENVLIST="DATABASE_URL=$DATABASE_URL SECRET_KEY=$SECRET_KEY HOSTNAME=$HOSTNAME SERVER_ADDRESS=$SERVER_ADDRESS SERVER_PORT=$SERVER_PORT SMTP_SERVER=$SMTP_SERVER SMTP_PORT=$SMTP_PORT SMTP_TLSTYPE=$SMTP_TLSTYPE"

daemon="$ENVLIST /usr/local/bin/brass"
daemon_user="www"
daemon_logger="daemon.info"

. /etc/rc.d/rc.subr

pexp=".*/usr/local/bin/brass.*"

rc_bg=YES

rc_cmd $1
# Postgres
# DATABASE_URL=postgres://postgres@localhost/my_database
# SQLite
DATABASE_URL=postgresql://brass:password@localhost/brass
# 64 byte long
SECRET_KEY="secret key"
HOSTNAME="brass.tfld.de"
ADDRESS="127.0.0.1"
PORT="8081"

SMTP_SERVER="localhost"
SMTP_PORT="25"
# SMTP_LOGIN=""
# SMTP_PASSWORD=""
SMTP_TLSTYPE="none"

drop test databases

for dbname in $(psql -c "copy (select datname from pg_database where datname like 'brass_test_%') to stdout") ; do
    echo "$dbname"
    #dropdb -i "$dbname"
done
Description
No description provided
Readme AGPL-3.0 20 MiB
Languages
Rust 77.4%
HTML 20.8%
JavaScript 1.1%
SCSS 0.7%