Replies: 3 comments 4 replies
-
There currently is an undocumented admin API route which might help with this. A In the config YAML file you can define the tokens: api:
tokens:
- [super secret token] Then you can use a defined token in the curl -X POST http://localhost:8080/api/admin/v1/diagnostics \
-H "Authorization: Bearer [super secret token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{}' |
Beta Was this translation helpful? Give feedback.
-
@stevensJourney Thank you. For those interested in, that's what I got: healthcheck:
test: 'curl -X POST http://localhost:${PS_PORT}/api/admin/v1/diagnostics -H "Authorization: Bearer ${PS_API_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d "{}" | grep "\"errors\":\[{" && exit 1 || exit 0'
interval: 5s
timeout: 1s
retries: 15 |
Beta Was this translation helpful? Give feedback.
-
Hi @JCKodel and @guillempuche you can now use the Example below:
|
Beta Was this translation helpful? Give feedback.
-
Sometimes, Powersync is in an invalid state and not much information is sent to the client about why.
For example:
It also stays in an invalid state when something is wrong with
sync_rules.yaml
(I see the exactly reason only on docker desktop logs panel).It would be nice a
GET
endpoint to check if there is any error in the service and returning200
or500
.That could be used in docker compose
healthcheck
.Beta Was this translation helpful? Give feedback.
All reactions