mirror of
https://github.com/Flomp/wanderer.git
synced 2025-12-19 03:30:50 -06:00
Add healthchecks (#437)
This commit is contained in:
@@ -990,6 +990,10 @@ func onBootstrapHandler() func(se *core.BootstrapEvent) error {
|
||||
}
|
||||
|
||||
func registerRoutes(se *core.ServeEvent, client meilisearch.ServiceManager) {
|
||||
se.Router.GET("/health", func(e *core.RequestEvent) error {
|
||||
return e.JSON(http.StatusOK, map[string]string{"status": "ok"})
|
||||
})
|
||||
|
||||
se.Router.GET("/public/search/token", func(e *core.RequestEvent) error {
|
||||
searchRules := map[string]interface{}{
|
||||
"lists": map[string]string{
|
||||
|
||||
@@ -10,7 +10,7 @@ services:
|
||||
image: getmeili/meilisearch:v1.11.3
|
||||
environment:
|
||||
<<: *cenv
|
||||
MEILI_NO_ANALYTICS: true
|
||||
MEILI_NO_ANALYTICS: "true"
|
||||
ports:
|
||||
- 7700:7700
|
||||
networks:
|
||||
@@ -41,6 +41,12 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/pb_data:/pb_data
|
||||
healthcheck:
|
||||
test: wget --spider -q http://localhost:8090/health || exit 1
|
||||
interval: 15s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
web:
|
||||
container_name: wanderer-web
|
||||
image: flomp/wanderer-web
|
||||
@@ -48,13 +54,13 @@ services:
|
||||
search:
|
||||
condition: service_healthy
|
||||
db:
|
||||
condition: service_started
|
||||
condition: service_healthy
|
||||
environment:
|
||||
<<: *cenv
|
||||
ORIGIN: http://localhost:3000
|
||||
BODY_SIZE_LIMIT: Infinity
|
||||
PUBLIC_POCKETBASE_URL: http://db:8090
|
||||
PUBLIC_DISABLE_SIGNUP: false
|
||||
PUBLIC_DISABLE_SIGNUP: "false"
|
||||
UPLOAD_FOLDER: /app/uploads
|
||||
UPLOAD_USER:
|
||||
UPLOAD_PASSWORD:
|
||||
@@ -67,6 +73,12 @@ services:
|
||||
networks:
|
||||
- wanderer
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: curl --fail http://localhost:3000/ || exit 1
|
||||
interval: 15s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
# valhalla:
|
||||
# image: ghcr.io/gis-ops/docker-valhalla/valhalla:latest
|
||||
# ports:
|
||||
|
||||
@@ -66,7 +66,7 @@ services:
|
||||
image: getmeili/meilisearch:v1.11.3
|
||||
environment:
|
||||
<<: *cenv
|
||||
MEILI_NO_ANALYTICS: true
|
||||
MEILI_NO_ANALYTICS: "true"
|
||||
ports:
|
||||
- 7700:7700
|
||||
networks:
|
||||
@@ -98,6 +98,12 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/pb_data:/pb_data
|
||||
healthcheck:
|
||||
test: wget --spider -q http://localhost:8090/health || exit 1
|
||||
interval: 15s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
|
||||
web:
|
||||
container_name: wanderer-web
|
||||
@@ -106,17 +112,17 @@ services:
|
||||
search:
|
||||
condition: service_healthy
|
||||
db:
|
||||
condition: service_started
|
||||
condition: service_healthy
|
||||
environment:
|
||||
<<: *cenv
|
||||
ORIGIN: http://localhost:3000
|
||||
BODY_SIZE_LIMIT: Infinity
|
||||
PUBLIC_POCKETBASE_URL: http://db:8090
|
||||
PUBLIC_DISABLE_SIGNUP: false
|
||||
PUBLIC_DISABLE_SIGNUP: "false"
|
||||
UPLOAD_FOLDER: /app/uploads
|
||||
UPLOAD_USER:
|
||||
UPLOAD_PASSWORD:
|
||||
PUBLIC_VALHALLA_URL: https://valhalla.openstreetmap1.de
|
||||
PUBLIC_VALHALLA_URL: https://valhalla1.openstreetmap.de
|
||||
PUBLIC_NOMINATIM_URL: https://nominatim.openstreetmap.org
|
||||
volumes:
|
||||
- ./data/uploads:/app/uploads
|
||||
@@ -125,6 +131,12 @@ services:
|
||||
networks:
|
||||
- wanderer
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: curl --fail http://localhost:3000/ || exit 1
|
||||
interval: 15s
|
||||
retries: 10
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
|
||||
networks:
|
||||
wanderer:
|
||||
|
||||
Reference in New Issue
Block a user