Skip to content

Commit 51df0da

Browse files
committed
chore(docker): restore the dev postgres pg_partman image
An earlier change on this branch inadvertently reverted the dev postgres setup back to plain postgres:14, dropping the pg_partman build and its shared_preload_libraries that were added separately on main. Restore docker-compose.yml, dev-compose.yml, and Dockerfile.postgres to match main so merging this branch does not undo that.
1 parent d3bc98c commit 51df0da

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

docker/Dockerfile.postgres

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM postgres:14
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends postgresql-14-partman \
5+
&& rm -rf /var/lib/apt/lists/*

docker/dev-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ networks:
1212
services:
1313
db:
1414
container_name: db-dev
15-
image: postgres:14
15+
build:
16+
context: .
17+
dockerfile: Dockerfile.postgres
1618
restart: always
1719
volumes:
1820
- database-data:/var/lib/postgresql/data/
@@ -29,6 +31,8 @@ services:
2931
- listen_addresses=*
3032
- -c
3133
- wal_level=logical
34+
- -c
35+
- shared_preload_libraries=pg_partman_bgw
3236

3337
electric:
3438
container_name: electric-dev

docker/docker-compose.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ networks:
2525
services:
2626
database:
2727
container_name: ${CONTAINER_PREFIX:-}database
28-
image: postgres:14
28+
build:
29+
context: .
30+
dockerfile: Dockerfile.postgres
2931
restart: always
3032
volumes:
3133
- ${DB_VOLUME:-database-data}:/var/lib/postgresql/data/
@@ -42,6 +44,8 @@ services:
4244
- listen_addresses=*
4345
- -c
4446
- wal_level=logical
47+
- -c
48+
- shared_preload_libraries=pg_partman_bgw
4549
# The webapp opens ~50 pooled connections per instance and Electric another
4650
# ~40, so the default 100 is exhausted by one webapp + Electric alone. Raise
4751
# it so multiple instances / load tests have headroom.
@@ -90,7 +94,9 @@ services:
9094
database-replica:
9195
container_name: ${CONTAINER_PREFIX:-}database-replica
9296
profiles: ["replica"]
93-
image: postgres:14
97+
build:
98+
context: .
99+
dockerfile: Dockerfile.postgres
94100
restart: always
95101
depends_on:
96102
- database

0 commit comments

Comments
 (0)