chore(compose): update Typesense and add healthcheck
adapted from https://github.com/typesense/typesense/issues/441#issuecomment-2452014001
This commit is contained in:
parent
a32b9e5558
commit
91fb0a6ea0
|
@ -2,9 +2,20 @@ services:
|
|||
typesense:
|
||||
environment:
|
||||
- TYPESENSE_API_KEY
|
||||
image: typesense/typesense:27.1
|
||||
image: typesense/typesense:28.0
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- ../.state/${COMPOSE_PROJECT_NAME:-funkwhale}/typesense/data:/data
|
||||
command: --data-dir /data --api-key=$${TYPESENSE_API_KEY} --enable-cors
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"bash",
|
||||
"-c",
|
||||
"exec 3<>/dev/tcp/localhost/8108 && printf 'GET /health HTTP/1.1\\r\\nConnection: close\\r\\n\\r\\n' >&3 && head -n1 <&3 | grep '200' && exec 3>&-",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
|
Loading…
Reference in New Issue