Queen guards the kitten den.
Find a file
2024-03-11 22:47:08 -07:00
assets doesn't not work 2024-02-25 16:34:32 -08:00
migrations Add receipt to DB to prevent double-use. 2024-03-10 13:02:25 -07:00
src add annual link to the rendered signup page 2024-03-11 22:47:08 -07:00
templates remove our assets dir service, we just use the forgejo assets 2024-03-11 08:25:18 -07:00
.env.example Update env handling and docs. 2024-03-11 18:21:11 -07:00
.gitignore Update env handling and docs. 2024-03-11 18:21:11 -07:00
.rustfmt.toml doesn't not work 2024-02-25 16:34:32 -08:00
Cargo.lock make .env a mandatory arg 2024-03-10 18:51:26 -07:00
Cargo.toml make .env a mandatory arg 2024-03-10 18:51:26 -07:00
queenie.service Update env handling and docs. 2024-03-11 18:21:11 -07:00
README.md Update env handling and docs. 2024-03-11 18:21:11 -07:00

Queen

Setting up dev environment

Copy the .env.example to .env then fill in missing variables:

cp .env.example .env

Use sqlx-cli (install using cargo install sqlx-cli) to create and migrate the database:

sqlx db create ; sqlx migrate run

Development

Run the server for development:

cargo run -- -e .env

The -e (or --env) option tells Queenie where to find its environment configuration file; the default is /etc/forgejo/queenie.env.

The assets used in Queen come from forgejo, so you can use a local Caddyfile to serve both forgejo and queen (assuming that forgejo is running on localhost:3000):

{
  http_port 9000
}

localhost:9000 {
	reverse_proxy /signup* localhost:4008
	reverse_proxy /payment_success* localhost:4008
	reverse_proxy localhost:3000
}

Run caddy with:

caddy run --config Caddyfile

Use in production

There's a sample systemd unit file, queenie.service.