fix min connection
All checks were successful
deploy / deploy (push) Successful in 27s
test / smoke-test (push) Successful in 5s

This commit is contained in:
Dusan Vojacek
2026-04-12 20:54:23 +02:00
parent 0ba72c7704
commit 3066a82265
3 changed files with 11 additions and 1 deletions

View File

@@ -16,7 +16,8 @@
# ---- PostgreSQL ---- # ---- PostgreSQL ----
DB_USER=ems_user DB_USER=ems_user
DB_PASSWORD=change_me_strong_password DB_PASSWORD=change_me_strong_password
# Limit současných připojení k DB (deploy/docker-compose + kořenové docker-compose). Výchozí v compose je 300.
# POSTGRES_MAX_CONNECTIONS=300
# ---- PostgREST ---- # ---- PostgREST ----
POSTGREST_JWT_SECRET=change_me_jwt_secret_min_32_chars POSTGREST_JWT_SECRET=change_me_jwt_secret_min_32_chars
# PostgREST anonymní role (viz db/migration/V009__postgrest_roles.sql + R__z_postgrest_ems_anon_grants.sql). # PostgREST anonymní role (viz db/migration/V009__postgrest_roles.sql + R__z_postgrest_ems_anon_grants.sql).

View File

@@ -10,6 +10,11 @@ services:
db: db:
image: timescale/timescaledb:2.26.1-pg18 image: timescale/timescaledb:2.26.1-pg18
restart: unless-stopped restart: unless-stopped
# Výchozí max_connections=100 snadno nestačí (PostgREST, backend, psql, IDE, MCP). Zvýšení přes .env.
command:
- postgres
- -c
- max_connections=${POSTGRES_MAX_CONNECTIONS:-100}
environment: environment:
POSTGRES_DB: ems POSTGRES_DB: ems
POSTGRES_USER: ${DB_USER} POSTGRES_USER: ${DB_USER}

View File

@@ -3,6 +3,10 @@ services:
db: db:
image: timescale/timescaledb:2.26.1-pg18 image: timescale/timescaledb:2.26.1-pg18
restart: unless-stopped restart: unless-stopped
command:
- postgres
- -c
- max_connections=${POSTGRES_MAX_CONNECTIONS:-300}
environment: environment:
POSTGRES_DB: ems POSTGRES_DB: ems
POSTGRES_USER: ${DB_USER} POSTGRES_USER: ${DB_USER}