Skip to content

Commit be2de5a

Browse files
committed
geonetwork: fix compose healthchecks and postgres image
- Use postgres:17 instead of postgis/postgis (multi-arch, no PostGIS needed with GEONETWORK_DB_TYPE=postgres) - Database healthcheck: verify geonetwork db/user exist via psql instead of pg_isready (avoids race with PostgreSQL init restart) - GeoNetwork healthcheck: check actual app endpoint, add start_period - Remove pglog volume (no longer needed)
1 parent 466c2f3 commit be2de5a

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

geonetwork/compose.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ volumes:
99
geonetwork:
1010
esdata:
1111
pgdata:
12-
pglog:
1312

1413
services:
1514
geonetwork:
1615
image: geonetwork:4.4
1716
healthcheck:
18-
test: curl http://localhost:8080/
19-
interval: 5s
20-
timeout: 5s
17+
test: "curl -f http://localhost:8080/geonetwork/srv/eng/catalog.search || exit 1"
18+
interval: 10s
19+
timeout: 10s
2120
retries: 30
21+
start_period: 60s
2222
restart: always
2323
volumes:
2424
- geonetwork:/catalogue-data
@@ -63,19 +63,18 @@ services:
6363
GEONETWORK_DB_PASSWORD: geonetwork
6464

6565
database:
66-
image: postgis/postgis:17-3.5
66+
image: postgres:17
6767
environment:
6868
POSTGRES_USER: geonetwork
6969
POSTGRES_PASSWORD: geonetwork
7070
POSTGRES_DB: geonetwork
7171
healthcheck:
72-
test: [CMD-SHELL, pg_isready -U postgres]
72+
test: [CMD-SHELL, "psql -U geonetwork -d geonetwork -c 'select 1' > /dev/null 2>&1 || exit 1"]
7373
interval: 5s
7474
timeout: 5s
7575
retries: 5
7676
volumes:
7777
- pgdata:/var/lib/postgresql/data
78-
- pglog:/var/log/postgresql
7978

8079
elasticsearch:
8180
image: elasticsearch:8.14.3

0 commit comments

Comments
 (0)