MitchellHarrison / stream-environment

Python. Postgres. Docker. | Microservices in pursuit of a better, more interactive live stream. https://twitch.tv/mitchsworkshop
https://twitch.tv/mitchsworkshop
MIT License
20 stars 12 forks source link

handle startup errors for database API #14

Closed MitchellHarrison closed 2 years ago

MitchellHarrison commented 2 years ago

Startup for the db_api service raises several peewee.OperationalErrors and psycopg2.OperationalErrors. This is currently handled in the docker_compose.yml file with restart: on-failure, but should be handled inside of the scripts itself with timed restart attempts.

MitchellHarrison commented 2 years ago

I handled this in the docker-compose.yml file rather than in the code itself. The docker-compose file performs a health check on the database image before running the db_api container.