mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-20 07:11:28 +02:00
Six services declare `env_file: .env` and nothing in the repo produced one, so compose refused to start a fresh checkout and CI had to write its own. .env.example carries every variable the code and the compose file read, grouped, with the pool budget and the two Celery limits explained where they matter. The Makefile help called migrate-create an autogenerate, which is the opposite of what it does and of how this repo writes migrations, and never mentioned migrate-draft. `make lint` and `make test` now run what CI runs, and dev-README says so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DafWxfoWZXVDgr9KroJBDZ
34 lines
823 B
Markdown
34 lines
823 B
Markdown
# First run
|
|
|
|
```
|
|
cp .env.example .env
|
|
sed -i "s/^SECRET_KEY=.*/SECRET_KEY=$(openssl rand -hex 32)/" .env
|
|
make up
|
|
make migrate # then restart the api
|
|
```
|
|
|
|
Every service reads `.env`; compose will not start without it.
|
|
|
|
# Migrations
|
|
|
|
Migrations are hand-written under `alembic/versions/`.
|
|
|
|
```
|
|
make migrate-create m="name" # an empty revision to hand-write
|
|
make migrate-draft m="name" # autogenerate a draft to edit down
|
|
make migrate # apply everything pending
|
|
make migrate-history # show the chain
|
|
make migrate-downgrade # roll the last one back
|
|
```
|
|
|
|
Apply migrations before restarting the api.
|
|
|
|
# Checks
|
|
|
|
```
|
|
make lint # ruff over every package, then prettier and eslint
|
|
make test # pytest in the api container, then svelte-check and vitest
|
|
```
|
|
|
|
Both are what CI runs.
|