提交
This commit is contained in:
1 parent
69ee0f505c
commit
2e66e03792
12 files changed
+1142
-11
No files matched your search
@@ -98,8 +98,11 @@ source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
cp .env.example .env.local # fill in DB, Redis, MinIO, etc.
|
||||
./start-local.sh # uvicorn --reload on 127.0.0.1:8000
|
||||
./start-prod.sh start # production (reads .env.production, PID-managed)
|
||||
./start-prod.sh start # production on :8111 (reads .env.production, PID-managed)
|
||||
./start-prod.sh status|stop|restart|logs
|
||||
./start-test.sh start # test on :8112 (reads .env.test, PID-managed)
|
||||
./start-test.sh activate # source .venv/bin/activate (interactive shell)
|
||||
./start-test.sh status|stop|restart|logs
|
||||
```
|
||||
|
||||
### Entrypoint & Structure
|
||||
@@ -117,7 +120,7 @@ cp .env.example .env.local # fill in DB, Redis, MinIO, etc.
|
||||
- API prefix: `/api` (set via `API_V1_PREFIX` in config). Routes: `/api/public/*`, `/api/admin/*`, `/api/supplier/*`, `/api/client/*`, `/api/deliver/*`
|
||||
- Auth: JWT + RSA-encrypted login. Login RSA key auto-generated or set via `LOGIN_RSA_PRIVATE_KEY_PEM` env var.
|
||||
- API encryption middleware: symmetric crypto layer controlled by `API_ENCRYPT_*` env vars. Excluded paths listed in `API_ENCRYPT_EXCLUDE_PATHS`.
|
||||
- Config: pydantic-settings (`app/core/config.py`), reads from `.env` / `.env.local` / `.env.production`.
|
||||
- Config: pydantic-settings (`app/core/config.py`), reads from `.env` / `.env.local` / `.env.production` / `.env.test` (via `ENV_FILE`).
|
||||
- Database init / schema baseline: `docs/sql/zkxw.sql`(从当前库导出的全量 SQL)。Default admin: `admin` / `111111`, role `super_admin`.
|
||||
- Swagger docs at `/docs`, ReDoc at `/redoc`.
|
||||
- Tests: minimal, only `tests/test_api_crypto.py`. Run with `pytest`.
|
||||
|
||||
Reference in new issue
Block a user