update with latest build versions, includes custom build for postgres and migrating from v16 to v18
This commit is contained in:
36
build/postgresql-postgis/docker-compose.test.yaml
Normal file
36
build/postgresql-postgis/docker-compose.test.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
# Docker Compose for local testing of PostgreSQL 18 + PostGIS image
|
||||
#
|
||||
# Usage:
|
||||
# docker-compose -f docker-compose.test.yaml up -d
|
||||
# docker-compose -f docker-compose.test.yaml exec postgres psql -U postgres
|
||||
# docker-compose -f docker-compose.test.yaml down -v
|
||||
#
|
||||
# NOTE: PostgreSQL 18 changed the data directory path!
|
||||
# PG 13-17: /var/lib/postgresql/data
|
||||
# PG 18+: /var/lib/postgresql
|
||||
#
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: cnpg-postgis:18-3.6
|
||||
platform: linux/arm64
|
||||
container_name: postgis-test
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: testpassword
|
||||
POSTGRES_DB: testdb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
# NOTE: PG18 uses /var/lib/postgresql (not /var/lib/postgresql/data)
|
||||
- postgres_data:/var/lib/postgresql
|
||||
- ./init-extensions.sql:/docker-entrypoint-initdb.d/20-extensions.sql:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user