Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infra/docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ COMPOSE_PATH_SEPARATOR=:

# Infra dependencies — pinned for reproducibility.
CLICKHOUSE_IMAGE_NAME=clickhouse/clickhouse-server:24.3.15.72-alpine
POSTGRES_IMAGE_NAME=ankane/pgvector:v0.5.1
POSTGRES_IMAGE_NAME=timescale/timescaledb-ha:pg16
# OTEL collector image vars removed — HOL-21 dropped the collector container.
# Backend hosts the OTLP receiver at /otel/v1/{logs,traces,metrics}.

Expand Down
8 changes: 7 additions & 1 deletion infra/docker/backend-dotnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS backend-buil

WORKDIR /src

# Copy project files first for layer caching
# Copy project files first for layer caching. Every project in the slnx
# must be listed here — `dotnet restore` walks the project graph and needs
# each .csproj to exist on disk before generating the assets file. Adding
# a new project means adding a new line here (HOL-25 added Analytics,
# HOL-26 added Data.Postgres).
COPY src/dotnet/HoldFast.Backend.slnx .
COPY src/dotnet/src/HoldFast.Analytics/HoldFast.Analytics.csproj src/HoldFast.Analytics/
COPY src/dotnet/src/HoldFast.Api/HoldFast.Api.csproj src/HoldFast.Api/
COPY src/dotnet/src/HoldFast.Data/HoldFast.Data.csproj src/HoldFast.Data/
COPY src/dotnet/src/HoldFast.Data.ClickHouse/HoldFast.Data.ClickHouse.csproj src/HoldFast.Data.ClickHouse/
COPY src/dotnet/src/HoldFast.Data.Postgres/HoldFast.Data.Postgres.csproj src/HoldFast.Data.Postgres/
COPY src/dotnet/src/HoldFast.Domain/HoldFast.Domain.csproj src/HoldFast.Domain/
COPY src/dotnet/src/HoldFast.GraphQL.Private/HoldFast.GraphQL.Private.csproj src/HoldFast.GraphQL.Private/
COPY src/dotnet/src/HoldFast.GraphQL.Public/HoldFast.GraphQL.Public.csproj src/HoldFast.GraphQL.Public/
Expand Down
12 changes: 10 additions & 2 deletions infra/docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ services:
postgres:
logging: *local-logging
container_name: postgres
# a postgres image with pgvector installed
# HOL-35: timescale/timescaledb-ha bundles TimescaleDB + pgvector +
# pg_partman, replacing ankane/pgvector. Same PG 16 underneath so
# the data volume is drop-in reusable; first start activates the
# extra extensions once HOL-26's 0003_install_extensions migration
# runs (or analyst opens psql + CREATE EXTENSION manually).
image: ${POSTGRES_IMAGE_NAME}
restart: on-failure
ports:
- '0.0.0.0:5432:5432'
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- postgres-data:/var/lib/postgresql/data
# HOL-35: timescale/timescaledb-ha lays out its data dir at
# /home/postgres/pgdata/data, not the upstream PG default. If
# you swap to a different PG image (e.g. plain postgres:16 or
# ankane/pgvector), revert to /var/lib/postgresql/data.
- postgres-data:/home/postgres/pgdata/data
- ../../tools/scripts/migrations/init.sql:/root/init.sql
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
Expand Down
13 changes: 9 additions & 4 deletions infra/docker/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@
<background_common_pool_size>4</background_common_pool_size>
<background_move_pool_size>2</background_move_pool_size>

<!-- Concurrent-query ceilings — single-tenant, no need for 100. -->
<max_concurrent_queries>20</max_concurrent_queries>
<max_concurrent_insert_queries>10</max_concurrent_insert_queries>
<max_concurrent_select_queries>10</max_concurrent_select_queries>
<!-- Concurrent-query ceilings. HOL-35: bumped from 20→50 / 10→25 /
10→25 after HOL-29 schema-discovery work hit
"Too many simultaneous queries" on simple SHOW CREATE TABLE.
The backend's six worker hosted services each keep CH busy with
small queries; 20 wasn't enough headroom. 50 is still well below
the default of 100 but accommodates the actual concurrency. -->
<max_concurrent_queries>50</max_concurrent_queries>
<max_concurrent_insert_queries>25</max_concurrent_insert_queries>
<max_concurrent_select_queries>25</max_concurrent_select_queries>

<!-- Async metrics collection. Default polls every 1s and keeps a
heavy 120s rollup; on an idle box that's pure noise. -->
Expand Down
Loading