Closed jwhitlock closed 3 years ago
Tracking the allows tools questions with PRs, as suggested by CONTRIBUTE.md:
The new endpoints are working in stage:
/__version__
returns data written at build time. Pretty-printed version:
{
"commit": "a0756d59a5d2bf06739725f16cd5bbb66ae96b14",
"version": "refs/heads/main",
"image_tag": "stg-a0756d5",
"source": "https://github.com/mozilla-it/ctms-api",
"build": "https://github.com/mozilla-it/ctms-api/actions/runs/655191335"
}
/__heartbeat__
returns if the backing services are available. Pretty-printed version:
{
"database": {
"up": true,
"time_ms": 3
}
}
/__lbheartbeat__
returns whenever the service is up. Pretty-printed version:
{
"status": "OK"
}
I'm tracking mozlog
in issue #106, and we'll handle production logging next sprint. I'll keep an eye on the suggestions for Dockerflow, in case we need to change our build CI or Docker repository.
https://github.com/mozilla-services/dockerflow is a specification for automated building, testing and publishing of docker web application images that comply to a common set of behaviors.
Tracked in Jira:OSS-278
Things we do already (fix if I'm wrong):
main
branch.stdout
orstderr
.Changes to make:
$PORT
(8000 recommended) rather than hard-coded port 80/app/version.json
/__version__
with the contents of/app/version.json
./__heartbeat__
with a HTTP 200 or 5xx on error. This should check backing services like a database for connectivity and may respond with the status of backing services and application components as a JSON payload./__lbheartbeat__
with an HTTP 200. This is for load balancer checks and should not check backing services (close to existing/health
endpoint)app
group and user, GID 10001 and UID 10001, set as user (currentlyroot
)Optional changes:
Maybe changes to make, need to ask @duallain or @sciurus :