-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.postgres.yml
More file actions
53 lines (50 loc) · 1.53 KB
/
docker-compose.postgres.yml
File metadata and controls
53 lines (50 loc) · 1.53 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# hyperi-pylib Local PostgreSQL for Integration Testing
# =================================================
# PostgreSQL 17 Alpine for cache backend testing
#
# Usage:
# docker compose -f docker-compose.postgres.yml up -d
# docker compose -f docker-compose.postgres.yml down -v
#
# PostgreSQL will be available at localhost:5432
# DSN: postgresql://postgres:postgres@localhost:5432/hyperi_pylib_test
#
# The integration tests will automatically detect and use this if
# no remote PostgreSQL is configured in the environment.
services:
postgres:
image: postgres:18-alpine
container_name: hyperi-pylib-postgres
hostname: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: hyperi_pylib_test
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d hyperi_pylib_test"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
# Optional: pgAdmin for debugging
pgadmin:
# Renovate will re-add SHA digest after next pass.
image: dpage/pgadmin4:9
container_name: hyperi-pylib-pgadmin
profiles:
- ui # Only start with: docker compose -f docker-compose.postgres.yml --profile ui up
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@hyperi.io
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: "False"
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data: