feat: add postgresql backing store

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-01-18 22:52:30 +01:00
parent e0d6172e21
commit 2b7014e038
10 changed files with 477 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
[env]
_.file = ".env"
RUST_LOG = "nocontrol=debug,info"
[tasks.test]
@@ -20,3 +21,16 @@ run = "docker compose -f ./templates/docker/docker-compose.yml down"
[tasks."local:logs"]
run = "docker compose -f ./templates/docker/docker-compose.yml logs -f --tail=500"
[tasks."db:migrate"]
run = """
mise run local:down
sleep 1
mise run local:up
cargo sqlx migrate run --source ./crates/nocontrol/migrations/postgres
"""
[tasks."db:shell"]
env = {PGPASSWORD = "devpassword"}
run = "psql -h localhost -p 5432 -d dev -U devuser"