diff --git a/README.md b/README.md index b35d4933..b5cf379e 100644 --- a/README.md +++ b/README.md @@ -97,69 +97,42 @@ Notes: - You can find the exact location from `psql` with: `SHOW config_file;` - After changing the port, restart PostgreSQL so the new port takes effect. -In development set `MODE=development` to allow lexicon enums to be populated. +In development set `MODE=development` to allow lexicon enums to be populated. When `MODE=development`, the app attempts to seed the database with 10 example records via `transfers/seed.py`; if a `contact` record already exists, the seed step is skipped. #### 5. Database and server +Choose one of the following: -
| - PostgreSQL + PostGIS installed locally - | -- Docker - | -
| +**Option A: Local PostgreSQL + PostGIS** ```bash -#run database migrations +# run database migrations alembic upgrade head # start development server uvicorn app.main:app --reload ``` - - | -+ +Notes: +* Requires PostgreSQL with PostGIS installed locally. +* Use the `POSTGRES_*` settings in `.env` for your local instance. + +**Option B: Docker Compose (dev)** ```bash # include -d flag for silent/detached build docker compose up --build ``` - | -
| -Requires PostgreSQL and PostGIS extensions to be installed locally - | --Requires Docker Desktop to be installed locally - | -
| - | -
-Run docker exec -it nmsamplelocations-app-1 bash to open a shell inside the running app container.
- |
-
| - | --After the database container is running, you can run tests with Pytest from your local command line (not necessarily inside the app container). - | -