Skip to content

Commit

Permalink
add HEALTHCHECK instruction to the Dockerfile (#1397)
Browse files Browse the repository at this point in the history
Since Martin gives us `/health` endpoint we could use it by default in
the Dockerfile.

I've added extra info to the doc about
https://github.com/willfarrell/docker-autoheal but not sure if that's
ok. I can remove it.
  • Loading branch information
caspg committed Jul 3, 2024
1 parent d270e8f commit 1a2e381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/files/multi-platform.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ ARG TARGETPLATFORM
LABEL org.opencontainers.image.description="Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support"
COPY target_releases/$TARGETPLATFORM/* /usr/local/bin

HEALTHCHECK CMD wget --spider http://localhost:3000/health || exit 1
ENTRYPOINT ["/usr/local/bin/martin"]
2 changes: 2 additions & 0 deletions docs/src/run-with-docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ docker compose up -d martin
```

By default, Martin will be available at [localhost:3000](http://localhost:3000/)

Official Docker image includes a `HEALTHCHECK` instruction which will be used by Docker Compose. Note that Compose won't restart unhealthy containers. To monitor and restart unhealthy containers you can use [Docker Autoheal](https://github.com/willfarrell/docker-autoheal).

0 comments on commit 1a2e381

Please sign in to comment.