chore: add local Postgres, justfile, and env example
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Connection string for local development and tests.
|
||||
# The role must be allowed to CREATE DATABASE (sqlx::test provisions temp DBs).
|
||||
DATABASE_URL=postgres://postgres:postgres@localhost:5432/cms_dev
|
||||
BIND_ADDR=0.0.0.0:8080
|
||||
APP_NAME=Collection Management System
|
||||
@@ -1 +1,2 @@
|
||||
/target
|
||||
.env
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: cms_dev
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
@@ -0,0 +1,20 @@
|
||||
set dotenv-load
|
||||
|
||||
# Run the server (reads .env)
|
||||
run:
|
||||
cargo run -p server
|
||||
|
||||
# Run the full test suite
|
||||
test:
|
||||
cargo test --workspace
|
||||
|
||||
# Format with the nightly toolchain
|
||||
fmt:
|
||||
cargo +nightly fmt
|
||||
|
||||
# Lint, treating warnings as errors
|
||||
lint:
|
||||
cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
# Format, lint, and test
|
||||
check: fmt lint test
|
||||
Reference in New Issue
Block a user