From ce323c4973c6c4617cade9c2706388a71999e975 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 29 Jun 2026 17:42:33 +0100 Subject: [PATCH] refactor: update README for observability and add test running instructions; update PostgreSQL port in Docker Compose; bump daphne version in requirements --- README.md | 11 +++++------ docker/docker-compose.local.yml | 2 ++ requirements.txt | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4e078f6f..d58d9d90 100644 --- a/README.md +++ b/README.md @@ -103,12 +103,6 @@ Host setup for logs sudo chmod 0755 /srv/rad/logs ``` -Viewing logs in Grafana -- Grafana is available on the port exposed by compose (default `3000`). -- The Loki datasource is configured to use `http://loki:3100` (see compose). In Grafana Explore choose the Loki datasource and run queries such as: - - - `{job="rad_app"}` (all collected logs) - - `{job="rad_app", filename="/var/log/rad/nginx.access.log"}` Notes & recommendations - In development the `logs/` folder is ignored by git (`/.gitignore` updated). Do not commit runtime logs. @@ -116,3 +110,8 @@ Notes & recommendations - If you need nginx to re-resolve the backend service IP without restarting, consider using `resolver` and variable-based upstreams in the nginx config. For many development workflows restarting nginx after web restarts is the simplest approach. If you want, I can also add a short `docs/OBSERVABILITY.md` with more details and recommended production settings (TLS/auth for Loki, retention, log rotation). + + +## Running tests + +Ensure the development Docker environment is running (COMPOSE_ENV=dev docker compose -f docker/docker-compose.local.yml -f docker/docker-compose.dev.yml up -d). \ No newline at end of file diff --git a/docker/docker-compose.local.yml b/docker/docker-compose.local.yml index ec7371fd..9bc4d724 100644 --- a/docker/docker-compose.local.yml +++ b/docker/docker-compose.local.yml @@ -56,6 +56,8 @@ services: - POSTGRES_USER=django - POSTGRES_PASSWORD=postgres - POSTGRES_DB=rad + ports: + - "5432:5432" pgadmin: image: dpage/pgadmin4:7.2 environment: diff --git a/requirements.txt b/requirements.txt index d7897456..22c9c66e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -61,7 +61,7 @@ pygments celery[redis] redis channels==4.1.0 -daphne==4.1.2 +daphne==4.2.2 channels-redis==4.2.1 pywatchman numpy==2.4.0