Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docker] Web_recipes waits for db_recipes to be ready #1437

Merged
merged 4 commits into from
Feb 3, 2022
Merged

[Docker] Web_recipes waits for db_recipes to be ready #1437

merged 4 commits into from
Feb 3, 2022

Conversation

MaxJa4
Copy link
Contributor

@MaxJa4 MaxJa4 commented Jan 30, 2022

Fixes the setup issue almost all Raspberry Pi users have and probably some others with slow or low spec systems.
The web_recipes container waits for db_recipes to be healthy.
db_recipes is healthy, as soon as postgres is completely ready.

Note: ps_isready doesn't work here for some reason.

Tested multiple times with a Raspberry Pi 4.

Fixes the setup issue almost all Raspberry Pi users have and probably some others with slow or low spec systems.
The web_recipes container waits for db_recipes to be healthy.
db_recipes is healthy, as soon as postgres is completely ready.

Note: ps_isready doesn't work here for some reason.

Tested multiple times with a Raspberry Pi 4.
@MaxJa4 MaxJa4 changed the title Web_recipes waits for db_recipes to be ready [Docker] Web_recipes waits for db_recipes to be ready Jan 30, 2022
@vabene1111
Copy link
Collaborator

awesome, thanks for fixing this 👍

1s faster interval (to increase retry speed on faster systems), 1s shorter timeout (since it db should react in a lot less than 1s), increased retries to 12 total so all adds up to 60s of potential retry-time for older systems (e.g. RPI 3)
@MaxJa4
Copy link
Contributor Author

MaxJa4 commented Jan 31, 2022

Testing with my RPI 3 now (have to reinstall it, haven't used it for a while; broken Wifi/BT)

@MaxJa4
Copy link
Contributor Author

MaxJa4 commented Jan 31, 2022

Ran into an issue here. Docker-Compose 1.25.0 (like supplied by apt install on a RPI) is not supporting that specific depends_on statement... >= 1.27.0 is needed.
The current version of Docker-Compose is 1.29.2 (which is also the way that the official docker docs suggest; using the pip-method like all online blogs suggest also use the newest version).
So it should be fine, can cause problems on old not up-to-date systems though... what do you think @vabene1111 ?

@MaxJa4
Copy link
Contributor Author

MaxJa4 commented Jan 31, 2022

Tested -> RPI 3 with this version of docker-compose.yml works like a charm :)

@vabene1111
Copy link
Collaborator

since only people with new installations will face this problems and existing users wont be impacted when updating this is totally fine (the docker compose version)

thanks for making this :)

@vabene1111 vabene1111 merged commit ed852b3 into TandoorRecipes:develop Feb 3, 2022
@MaxJa4 MaxJa4 deleted the improvement/wait_for_db branch February 3, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants