feat: add healthcheks to programY skills
@@ -103,6 +103,12 @@ services:
context: ./skills/program-y/
working_dir: /src/dream_aiml/scripts/xnix
command: ./sanic.sh
+ healthcheck:
+ test: ["CMD-SHELL", "curl -s --header \"Content-Type: application/json\" --request POST --data '{\"sentences_batch\":[[\"lets chat\"]],\"user_ids\":[123131]}' http://localhost:8008/api/rest/v1.0/ask || exit 1"]
+ interval: 10s
+ timeout: 2s
+ retries: 3
+ start_period: 1m
deploy:
mode: replicated
replicas: 4
@@ -237,6 +243,12 @@ services:
context: ./skills/program-y-dangerous/
working_dir: /src/dream_aiml/scripts/xnix
command: ./sanic.sh
+ healthcheck:
+ test: ["CMD-SHELL", "curl -s --header \"Content-Type: application/json\" --request POST --data '{\"sentences_batch\":[[\"i want to commit a suicide\"]],\"user_ids\":[123131]}' http://localhost:8008/api/rest/v1.0/ask || exit 1"]
+ interval: 10s
+ timeout: 2s
+ retries: 3
+ start_period: 1m
deploy:
mode: replicated
replicas: 4
