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/.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/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/compose.dev.yaml similarity index 74% rename from docker-compose-dev.yaml rename to compose.dev.yaml index 61d4376bbf..8b53a5a994 100644 --- a/docker-compose-dev.yaml +++ b/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: @@ -12,14 +12,16 @@ services: ports: - 5432:5432 volumes: - - hyperion_db_data:/var/lib/postgresql/data + - ./hyperion-db:/var/lib/postgresql/data hyperion-redis: - image: redis + image: redis:7.0-alpine3.17 container_name: hyperion-redis-dev restart: unless-stopped ports: - 6379:6379 + volumes: + - ./hyperion-redis:/data volumes: hyperion_db_data: diff --git a/docker-compose.yaml b/compose.yaml similarity index 74% rename from docker-compose.yaml rename to compose.yaml index da639f6859..b082ec9733 100644 --- a/docker-compose.yaml +++ b/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: @@ -14,15 +14,17 @@ 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 + image: redis:7.0-alpine3.17 container_name: hyperion-redis restart: unless-stopped command: redis-server --requirepass ${REDIS_PASSWORD} environment: REDIS_PASSWORD: ${REDIS_PASSWORD} + volumes: + - ./hyperion-redis:/data hyperion-app: build: @@ -39,7 +41,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