added status endpoint for checking if webserver is running w/ burnettk

This commit is contained in:
jasquat 2022-06-23 15:27:53 -04:00
parent 0f1ed7a662
commit a9d40937a2
4 changed files with 23 additions and 2 deletions

View File

@ -17,4 +17,4 @@ if [[ "${RUN_WITH_DAEMON:-}" != "false" ]]; then
additional_args="${additional_args} -d"
fi
docker compose up --build $additional_args
docker compose up --wait --build $additional_args

View File

@ -36,7 +36,9 @@ services:
ports:
- "7000:7000"
volumes:
- ${BPMN_SPEC_ABSOLUTE_DIR}:/app/process_models
- ${BPMN_SPEC_ABSOLUTE_DIR:-./../sample-process-models}:/app/process_models
healthcheck:
test: curl localhost:7000/v1.0/status --fail
volumes:
spiffworkflow_backend:

View File

@ -10,6 +10,21 @@ security:
- jwt: ["secret"]
paths:
/status:
get:
security: []
operationId: spiffworkflow_backend.routes.process_api_blueprint.status
summary: Returns 200 if the server is Responding
tags:
- Liveness
- Status
responses:
"200":
description: The server is running.
content:
application/json:
schema:
$ref: "#components/schemas/OkTrue"
/process-groups:
parameters:
- name: page

View File

@ -43,6 +43,10 @@ from spiffworkflow_backend.services.spec_file_service import SpecFileService
process_api_blueprint = Blueprint("process_api", __name__)
def status() -> flask.wrappers.Response:
return Response(json.dumps({"ok": True}), status=200, mimetype="application/json")
def process_group_add(
body: Dict[str, Union[str, bool, int]]
) -> flask.wrappers.Response: