Skip to content

docker-compose health check should be aware of restart during install of postgis extension #420

@devrimbaris

Description

@devrimbaris

Feature description

Hi,
Currently the pg_isready check seems to return true when initial container starts. However after postgis extensions are installed the database is shut down. The second service may get the healthy trigger and try to connect to a shutdown postgresql.

A check like following which actually checks postgis extension installation may help overcome this issue:

test: [ "CMD-SHELL","psql -U docker -d fsdb -c \"SELECT ST_Buffer( ST_SetSRID('POINT(0 0)'::GEOMETRY, 4326), 1) AS geom ;\""]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions