-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (30 loc) · 969 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (30 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
services:
postgres:
image: postgres:16
ports:
# Default to 5433 so host PostgreSQL can own 5432 (see DB_PORT in config/test.exs).
- "${THREADLINE_DB_PORT:-5433}:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: threadline_test
# Lets PgBouncer reach Postgres on the Docker network without SCRAM friction in dev/CI.
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d threadline_test"]
interval: 5s
timeout: 5s
retries: 10
pgbouncer:
image: edoburu/pgbouncer:latest
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/threadline_test
AUTH_TYPE: scram-sha-256
POOL_MODE: transaction
MAX_CLIENT_CONN: 200
DEFAULT_POOL_SIZE: 5
ports:
- "${THREADLINE_PGBOUNCER_PORT:-6432}:5432"