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
An auto-generated reference of every known variable is on the [Settings](../settings.md) page; below are the ones that matter operationally, grouped by purpose.
10
+
An auto-generated reference of every known variable is on the [Settings](settings.md) page; below are the ones that matter operationally, grouped by purpose.
11
+
12
+
!!! note "Local development"
13
+
When running via the repository's `compose.yml`, all of these variables are read from a gitignored `.env` file (template: `env.sample`) — see [Getting Started](../development/getting-started.md#configuration) for a working development configuration.
Copy file name to clipboardExpand all lines: docs/src/development/demo.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,28 @@
1
1
# Demo App and API Scripts
2
2
3
-
A self-contained demo environment with sample images and helper scripts lets you exercise the whole system — including the REST API — without configuring anything.
3
+
A self-contained demo environment with sample images and helper scripts lets you exercise the whole system — including the REST API.
4
4
5
5
## Running the demo server
6
6
7
+
Use the root `compose.yml` — on startup the backend seeds the demo data via the `demo` management command. It needs a `.env` file first (see [Getting Started](getting-started.md#configuration) for a working development configuration):
8
+
7
9
```console
8
-
$ docker compose -f tests/extras/demoapp/compose.yml up --build
10
+
$ cp env.sample .env # fill in the values from Getting Started
11
+
$ docker compose up --build
9
12
```
10
13
11
-
(The root `compose.yml` also seeds the same demo data via the `demo` management command.)
14
+
(To demo a published release instead of building locally, follow the [deployment guide](../admin/deployment.md) with the desired image tag — but note the API scripts below track the current code, so they may not work against older releases.)
- Username / password: the `ADMIN_EMAIL` / `ADMIN_PASSWORD` values from your `.env`
18
20
19
21
The demo setup creates an external system and an API token you can find under `Home › Api › Tokens`.
20
22
21
23
## API interaction scripts
22
24
23
-
Shell scripts in `tests/extras/demoapp/scripts/` drive the API end to end. They require [httpie](https://httpie.io/) and [jq](https://jqlang.github.io/jq/).
25
+
Shell scripts in `tests/extras/demoapp/scripts/` drive the API end to end. They require [httpie](https://httpie.io/), [jq](https://jqlang.github.io/jq/), and the `mimetype` command (Debian/Ubuntu package `libfile-mimeinfo-perl`).
Copy file name to clipboardExpand all lines: docs/src/development/getting-started.md
+63-3Lines changed: 63 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,18 +11,76 @@ Two ways to develop locally: **Docker Compose** (recommended — everything incl
11
11
12
12
## Option A: Docker Compose (recommended)
13
13
14
-
The repository's `compose.yml` starts the full stack — backend, Celery worker, Celery beat, Flower, PostgreSQL, and Redis:
14
+
The repository's `compose.yml` starts the full stack — backend, Celery worker, Celery beat, Flower, PostgreSQL, Redis, and Azurite (local Azure blob emulator). It reads all environment configuration from a `.env` file (gitignored) next to `compose.yml`:
15
15
16
16
```console
17
+
$ cp env.sample .env # then fill in the values (see below)
17
18
$ docker compose up --build
18
19
```
19
20
20
-
On startup the backend seeds demo data, applies migrations, and serves at [http://localhost:8000](http://localhost:8000). The admin panel is at `/admin/` (credentials from the compose environment: `adm@hde.org` / `123`), the API docs at `/api/rest/swagger/`.
21
+
On startup the backend seeds demo data, applies migrations, and serves at [http://localhost:8000](http://localhost:8000). The admin panel is at `/admin/` (credentials `ADMIN_EMAIL` / `ADMIN_PASSWORD` from your `.env`), the API docs at `/api/rest/swagger/`.
22
+
23
+
### Configuration
24
+
25
+
`env.sample` lists every required key; `.env` is never committed, so real tokens and connection strings are safe there. This configuration works with the compose stack as-is (Azurite for blob storages, local filesystem for uploaded images):
(The `AccountKey` above is [Azurite's public well-known development key](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite#well-known-storage-account-and-key), not a secret.)
21
76
22
-
Things to know:
77
+
Compose-level knobs (volume paths and port bindings) can also be set in `.env`: `IMAGES_HOST_PATH` (host directory for uploaded images, default `./var/data`), `DB_PORT`, `REDIS_PORT`, `CELERY_CONCURRENCY`.
78
+
79
+
### Things to know
23
80
24
81
- The repo is bind-mounted into the containers, so code changes are picked up by `runserver` automatically. The Celery worker does **not** auto-reload — restart it after changing task code.
25
82
- Model weight files are mounted from `./weights` (DeepFace) and `./ofiq_omdels` (OFIQ). See the comments in `compose.yml` for debugging variants of the service commands (debugpy).
83
+
- Uploaded images are stored under `./var/data` on the host — the same directory is mounted into the backend and the workers, mirroring the shared storage mount used in production.
26
84
- Run any management command inside the stack with `docker compose run --rm backend django-admin <command>`.
27
85
28
86
## Option B: Native virtualenv
@@ -73,6 +131,8 @@ $ uv sync --group docs
73
131
$ uv run mkdocs serve # http://127.0.0.1:8001
74
132
```
75
133
134
+
Alternatively, serve them from the compose stack (port 8012): `docker compose --profile docs up docs`.
0 commit comments