hpi-sam / digital-fuesim-manv

A German simulation system for training emergency medical services leadership personnel on how to manage Mass Casualty Incidents.
https://fuesim-manv.de/
GNU Affero General Public License v3.0
16 stars 8 forks source link

Dockerfile should include healthchecks for frontend and backend #452

Open anonym-HPI opened 2 years ago

ClFeSc commented 2 years ago

@anonym-HPI Do you plan to do this this week?

anonym-HPI commented 2 years ago

Planning to do this in the next time.

There is already the /api/health, is this taking into account everything in the backend and frontend? When being able to connect to it the frontend should probably work, what about database initialization?

@ClFeSc I would propose to do something inside nodejs, when this is not already covered by the current /health/api

ClFeSc commented 2 years ago

/api/health returns a success code whenever it's called. So we don't know whether there are other problems, but we do know that the api is up and accepting and processing requests.

The frontend health route is very similar to this.

So you can use them for health checks.

anonym-HPI commented 2 years ago

Should we make the health check more into checking everything (so that /api/health returns 200, e.g. when database is enabled check if database migration and connection where sucessfull)?

anonym-HPI commented 2 years ago

@ClFeSc what do you think about this or what is currently missing if accessing /api/health (checks if api is up, but doesn't it check frontend or only nginx or in dev port 3201 or so, so something like, do we get front page would be better?)?

ClFeSc commented 2 years ago

I would leave the health routes as they are. Just use them as-is.