From 0b6f366c1647ed5a8ad9e0b7829787c0b6728ca7 Mon Sep 17 00:00:00 2001 From: Marc-Andrieu Date: Tue, 3 Feb 2026 14:46:42 +0100 Subject: [PATCH 1/6] Pin versions of Postgres, Redis, Python and uv in CI, Dockerfile and Docker composes --- .github/workflows/lintandformat.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- Dockerfile | 2 +- docker-compose-dev.yaml | 4 ++-- docker-compose.yaml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lintandformat.yml b/.github/workflows/lintandformat.yml index 9d7ec45869..05e36a8c53 100644 --- a/.github/workflows/lintandformat.yml +++ b/.github/workflows/lintandformat.yml @@ -19,7 +19,7 @@ jobs: uses: actions/setup-python@v6 id: setup-python with: - python-version: "3.14" + python-version-file: .python-version - name: Cache uv folder id: cache-uv @@ -29,7 +29,7 @@ jobs: key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }} - name: Install uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh + run: curl -LsSf https://astral.sh/uv/0.9.27/install.sh | sh - name: Install dependencies run: uv pip install --system -r requirements-dev.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9f0fa79e7..eb444b3d3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: # Label used to access the service container redis: # Docker Hub image - image: redis + image: redis:7.0-alpine3.17 # Set health checks to wait until redis has started options: >- --health-cmd "redis-cli ping" @@ -32,7 +32,7 @@ jobs: - 6379:6379 postgres: # Docker Hub image - image: "postgres:15.1" + image: postgres:15.1-alpine3.17 # Provide the password for postgres env: POSTGRES_PASSWORD: "somerealpassword" @@ -60,7 +60,7 @@ jobs: uses: actions/setup-python@v6 id: setup-python with: - python-version: "3.14" + python-version-file: .python-version - name: Cache uv folder id: cache-uv @@ -70,7 +70,7 @@ jobs: key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }} - name: Install uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh + run: curl -LsSf https://astral.sh/uv/0.9.27/install.sh | sh - name: Install dependencies run: uv pip install --system -r requirements-dev.txt diff --git a/Dockerfile b/Dockerfile index 64589c1bd3..a5deaabb18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/astral-sh/uv:python3.14-trixie-slim +FROM ghcr.io/astral-sh/uv:0.9.27-python3.14-trixie-slim # Default number of workers; can be overridden at runtime ENV WORKERS=1 diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index 61d4376bbf..ae889b3267 100644 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -1,6 +1,6 @@ services: hyperion-db: - image: postgres + image: postgres:15.1-alpine3.17 container_name: hyperion-db-dev restart: unless-stopped environment: @@ -15,7 +15,7 @@ services: - hyperion_db_data:/var/lib/postgresql/data hyperion-redis: - image: redis + image: redis:7.0-alpine3.17 container_name: hyperion-redis-dev restart: unless-stopped ports: diff --git a/docker-compose.yaml b/docker-compose.yaml index da639f6859..6eb36874f4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,6 @@ services: hyperion-db: - image: postgres + image: postgres:15.1-alpine3.17 container_name: hyperion-db restart: unless-stopped healthcheck: @@ -17,7 +17,7 @@ services: - ./hyperion_db_data:/var/lib/postgresql/data:Z hyperion-redis: - image: redis + image: redis:7.0-alpine3.17 container_name: hyperion-redis restart: unless-stopped command: redis-server --requirepass ${REDIS_PASSWORD} From 19d08b65001d41807a1e3802b6ade8a7c53b88cf Mon Sep 17 00:00:00 2001 From: Marc-Andrieu Date: Tue, 3 Feb 2026 15:13:43 +0100 Subject: [PATCH 2/6] From docker-compose to compose --- docker-compose-dev.yaml => compose-dev.yaml | 0 docker-compose.yaml => compose.yaml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename docker-compose-dev.yaml => compose-dev.yaml (100%) rename docker-compose.yaml => compose.yaml (100%) diff --git a/docker-compose-dev.yaml b/compose-dev.yaml similarity index 100% rename from docker-compose-dev.yaml rename to compose-dev.yaml diff --git a/docker-compose.yaml b/compose.yaml similarity index 100% rename from docker-compose.yaml rename to compose.yaml From 2dcf37bf91da1a57ab3b0d22654cfa528a5005d6 Mon Sep 17 00:00:00 2001 From: Marc-Andrieu Date: Tue, 3 Feb 2026 15:27:47 +0100 Subject: [PATCH 3/6] Remove SE Linux ":Z" and use the gitignored volume --- compose-dev.yaml => compose.dev.yaml | 0 compose.yaml | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) rename compose-dev.yaml => compose.dev.yaml (100%) diff --git a/compose-dev.yaml b/compose.dev.yaml similarity index 100% rename from compose-dev.yaml rename to compose.dev.yaml diff --git a/compose.yaml b/compose.yaml index 6eb36874f4..96a5a40a3c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -14,7 +14,7 @@ services: POSTGRES_DB: ${POSTGRES_DB} PGTZ: ${POSTGRES_TZ} volumes: - - ./hyperion_db_data:/var/lib/postgresql/data:Z + - ./hyperion-db:/var/lib/postgresql/data hyperion-redis: image: redis:7.0-alpine3.17 @@ -39,7 +39,7 @@ services: - 8000:8000 env_file: .env volumes: - - ./logs:/hyperion/logs:Z - - ./data:/hyperion/data:Z - - ./config.yaml:/hyperion/config.yaml:Z - - ./firebase.json:/hyperion/firebase.json:Z + - ./logs:/hyperion/logs + - ./data:/hyperion/data + - ./config.yaml:/hyperion/config.yaml + - ./firebase.json:/hyperion/firebase.json From 85634e9e53068e51788e2461a3c1a07e02573186 Mon Sep 17 00:00:00 2001 From: Marc-Andrieu Date: Tue, 3 Feb 2026 15:30:19 +0100 Subject: [PATCH 4/6] forgot --- compose.dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose.dev.yaml b/compose.dev.yaml index ae889b3267..6e8d7b4257 100644 --- a/compose.dev.yaml +++ b/compose.dev.yaml @@ -12,7 +12,7 @@ services: ports: - 5432:5432 volumes: - - hyperion_db_data:/var/lib/postgresql/data + - hyperion-db:/var/lib/postgresql/data hyperion-redis: image: redis:7.0-alpine3.17 From 14464ef2fdab8c524fcff59200b211011bc93e21 Mon Sep 17 00:00:00 2001 From: Marc-Andrieu Date: Tue, 3 Feb 2026 15:38:46 +0100 Subject: [PATCH 5/6] Redis: no anonymous volumes --- .gitignore | 3 ++- compose.dev.yaml | 4 +++- compose.yaml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d02855758b..9b2becf9e5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,8 @@ __pycache__/ .pytest_cache/ .ruff_cache/ -# Databases (PostgreSQL and SQLite) +# Databases (PostgreSQL and SQLite) and Redis volumes +hyperion-redis/ hyperion-db/ *.db diff --git a/compose.dev.yaml b/compose.dev.yaml index 6e8d7b4257..af20df7fdb 100644 --- a/compose.dev.yaml +++ b/compose.dev.yaml @@ -12,7 +12,7 @@ services: ports: - 5432:5432 volumes: - - hyperion-db:/var/lib/postgresql/data + - ./hyperion-db:/var/lib/postgresql/data hyperion-redis: image: redis:7.0-alpine3.17 @@ -20,6 +20,8 @@ services: restart: unless-stopped ports: - 6379:6379 + volumes: + - ./hyperion_redis:/data volumes: hyperion_db_data: diff --git a/compose.yaml b/compose.yaml index 96a5a40a3c..e8bc0a203f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -23,6 +23,8 @@ services: command: redis-server --requirepass ${REDIS_PASSWORD} environment: REDIS_PASSWORD: ${REDIS_PASSWORD} + volumes: + - ./hyperion_redis:/data hyperion-app: build: From 99b038cc25b0b91556a877cee29b2bb57ce46ebe Mon Sep 17 00:00:00 2001 From: Marc-Andrieu Date: Tue, 3 Feb 2026 15:39:22 +0100 Subject: [PATCH 6/6] fix --- compose.dev.yaml | 2 +- compose.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compose.dev.yaml b/compose.dev.yaml index af20df7fdb..8b53a5a994 100644 --- a/compose.dev.yaml +++ b/compose.dev.yaml @@ -21,7 +21,7 @@ services: ports: - 6379:6379 volumes: - - ./hyperion_redis:/data + - ./hyperion-redis:/data volumes: hyperion_db_data: diff --git a/compose.yaml b/compose.yaml index e8bc0a203f..b082ec9733 100644 --- a/compose.yaml +++ b/compose.yaml @@ -24,7 +24,7 @@ services: environment: REDIS_PASSWORD: ${REDIS_PASSWORD} volumes: - - ./hyperion_redis:/data + - ./hyperion-redis:/data hyperion-app: build: