Skip to content

Commit

Permalink
Move healthcheck to docker-compose.yml (#35)
Browse files Browse the repository at this point in the history
* Move healthcheck to docker-compose.yml

* Fix tool dependency output

* Set docker image version in docker-compose.yml
  • Loading branch information
tschaffter authored Jan 28, 2021
1 parent 642ee54 commit c8b25c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 34 deletions.
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ version: "3.8"

services:
person-name-annotator:
image: nlpsandbox/person-name-annotator-example:latest
image: nlpsandbox/person-name-annotator-example:0.3.1
build:
context: server
dockerfile: Dockerfile
container_name: person-name-annotator
healthcheck:
test: curl --fail http://localhost:8080/api/v1/healthCheck
interval: 10s
timeout: 5s
retries: 5
ports:
- "8080:8080"
29 changes: 0 additions & 29 deletions server/.openapi-generator/FILES

This file was deleted.

2 changes: 0 additions & 2 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ RUN pip install --no-cache-dir \

EXPOSE 8080

HEALTHCHECK --interval=60s --timeout=3s --start-period=5s CMD curl --fail http://localhost:8080/api/v1/healthCheck

ENTRYPOINT ["/docker-entrypoint.sh"]

# Run server in development mode
Expand Down
4 changes: 2 additions & 2 deletions server/openapi_server/controllers/tool_controller.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from openapi_server.models.tool import Tool # noqa: E501
# from openapi_server.models.tool_dependencies import ToolDependencies # noqa: E501
from openapi_server.models.tool_dependencies import ToolDependencies # noqa: E501


def get_tool(): # noqa: E501
Expand Down Expand Up @@ -34,4 +34,4 @@ def get_tool_dependencies(): # noqa: E501
:rtype: ToolDependencies
"""
return [], 200
return ToolDependencies(tool_dependencies=[]), 200

0 comments on commit c8b25c1

Please sign in to comment.