Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Operations

Reference

Container measurement

The application container image in deploy/docker/Dockerfile and the measurement stack in deploy/docker/compose.measure.yml, which are not a deployment artefact.

The repository holds a container image of the application tier and a Compose file that runs it next to PostgreSQL 16. Both exist to measure performance budgets on the real Linux process model; a node is installed with deploy/install.sh, not with containers (deploy/docker/compose.measure.yml:1-5). This page describes deploy/docker/Dockerfile and deploy/docker/compose.measure.yml.

Scope and source

  • Defined in: deploy/docker/Dockerfile (one build target, runtime) and deploy/docker/compose.measure.yml (two services, db and app).
  • Count: two services and one named volume, counted from the Compose file.

Image

Part Behaviour Source
Base python:3.12-slim-bookworm, build target runtime. deploy/docker/Dockerfile:10
Environment Unbuffered output, no byte-code files, no pip cache, no pip version check. deploy/docker/Dockerfile:12-15
System packages PostgreSQL client tools for the backup runner, libpq5, and curl. deploy/docker/Dockerfile:17-21
User A system user with a fixed numeric id owns the application folder; the container runs as that user. deploy/docker/Dockerfile:23-24, deploy/docker/Dockerfile:41
Dependencies requirements.lock with --require-hashes, before the source for layer caching. deploy/docker/Dockerfile:26-28
Content pyproject.toml, README.md, src, migrations, alembic.ini, webapp, the gunicorn configuration, and scripts/backup. deploy/docker/Dockerfile:30-36
Install The project without dependency resolution, plus state and backup folders owned by the user. deploy/docker/Dockerfile:37-39
Health check curl against /ready every 15 seconds. deploy/docker/Dockerfile:43-44
Command gunicorn with deploy/gunicorn.conf.py and cluster_erp.server.asgi:app. deploy/docker/Dockerfile:46

The image contains no compiler and no Qt toolkit, and no database (deploy/docker/Dockerfile:1-7).

Measurement stack

Service Behaviour Source
db postgres:16 with a fixed max_connections and shared_buffers, a health check, a named data volume, and its port published on the loopback interface only. deploy/docker/compose.measure.yml:16-31
app Built from the Dockerfile, started after db is healthy, with worker count, pool size, and keys from the environment, and its port published on the loopback interface only. deploy/docker/compose.measure.yml:32-58

Compose refuses to start the services without MEASURE_DB_PASSWORD (for db) and MEASURE_SECRET_KEY (for app), through the :? form of the variables (deploy/docker/compose.measure.yml:20, deploy/docker/compose.measure.yml:44). MEASURE_WORKERS sets the worker count and defaults to four (deploy/docker/compose.measure.yml:43). The storage and backup keys fall back to fixed test values when MEASURE_STORAGE_KEY and MEASURE_BACKUP_KEY are unset (deploy/docker/compose.measure.yml:53-54); the values are omitted under the security disclosure policy.

The header comments describe the run: build and start db, load a dump of the test database, start app, and run the performance budget suite against it (deploy/docker/compose.measure.yml:7-14).

Constraints and validation

  • CLUSTER_ERP_DEBUG is false and CLUSTER_ERP_TRUST_PROXY_HEADERS is false in the stack, so the settings validation of a production start applies (deploy/docker/compose.measure.yml:44, deploy/docker/compose.measure.yml:55).
  • The container listens on all interfaces inside the container network (CLUSTER_ERP_SERVER_HOST) and is reachable from the host only through the loopback binding (deploy/docker/compose.measure.yml:41, deploy/docker/compose.measure.yml:57-58).

Terms introduced

Term Code identifier Definition Turkish term Source
measurement stack compose.measure.yml The Compose file that runs the application image next to PostgreSQL to measure performance budgets. ölçüm yığını deploy/docker/compose.measure.yml:1-5

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13