You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,36 @@ Notes:
140
140
* Create file gcs_credentials.json in the root directory of the project, and obtain its contents from a teammate.
141
141
* PostgreSQL uses the default port 5432.
142
142
143
+
Minimum vars to set in `.env` for local development:
144
+
*`POSTGRES_USER`
145
+
*`POSTGRES_PASSWORD`
146
+
*`POSTGRES_DB` (`ocotilloapi_dev` when using Docker Compose dev)
147
+
*`POSTGRES_HOST` (`localhost` for local psql/pytest against mapped Docker port)
148
+
*`POSTGRES_PORT` (`5432`)
149
+
*`MODE` (`development` recommended locally)
150
+
*`SESSION_SECRET_KEY`
151
+
152
+
Auth-related vars (required when auth is enabled, optional when `AUTHENTIK_DISABLE_AUTHENTICATION=1`):
153
+
*`AUTHENTIK_DISABLE_AUTHENTICATION`
154
+
*`AUTHENTIK_URL`
155
+
*`AUTHENTIK_CLIENT_ID`
156
+
*`AUTHENTIK_AUTHORIZE_URL`
157
+
*`AUTHENTIK_TOKEN_URL`
158
+
159
+
pygeoapi vars:
160
+
*`PYGEOAPI_MOUNT_PATH` (default `/ogcapi`)
161
+
*`PYGEOAPI_RUNTIME_DIR` (default `/tmp/pygeoapi`)
162
+
*`PYGEOAPI_POSTGRES_HOST`
163
+
*`PYGEOAPI_POSTGRES_PORT`
164
+
*`PYGEOAPI_POSTGRES_DB`
165
+
*`PYGEOAPI_POSTGRES_USER`
166
+
*`PYGEOAPI_POSTGRES_PASSWORD`
167
+
168
+
Optional telemetry vars:
169
+
*`SENTRY_DSN`
170
+
*`APITALLY_CLIENT_ID`
171
+
*`ENVIRONMENT`
172
+
143
173
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.
144
174
145
175
#### 5. Database and server
@@ -169,9 +199,13 @@ docker compose up --build
169
199
170
200
Notes:
171
201
* Requires Docker Desktop.
172
-
* Spins up two containers: `db` (PostGIS/PostgreSQL) and `app` (FastAPI API service).
202
+
* By default, spins up two containers: `db_dev` (PostGIS/PostgreSQL) and `app` (FastAPI API service).
203
+
*`db_test` is opt-in via profile: `docker compose --profile test up`.
173
204
*`alembic upgrade head` runs on app startup after `docker compose up`.
174
-
* The database listens on port `5432` both inside the container and on your host. Ensure `POSTGRES_PORT=5432` in your `.env` to run local commands against the Docker DB (e.g., `uv run pytest`, `uv run python -m transfers.transfer`).
205
+
* Compose uses hardcoded DB names:
206
+
* dev: `ocotilloapi_dev`
207
+
* test: `ocotilloapi_test`
208
+
* The database listens on port `5432` both inside the container and on your host. Ensure `POSTGRES_PORT=5432` and `POSTGRES_DB=ocotilloapi_dev` in your `.env` to run local commands against the Docker dev DB (e.g., `uv run pytest`, `uv run python -m transfers.transfer`).
0 commit comments