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

start dev ckan in parallel #136

Merged
merged 1 commit into from
Apr 26, 2024
Merged

start dev ckan in parallel #136

merged 1 commit into from
Apr 26, 2024

Conversation

wardi
Copy link
Contributor

@wardi wardi commented Apr 23, 2024

One day our ckan container might be fast enough to start using db/postgres/redis before they are ready. Today is not that day.

Starting the dev environment now launches the db, postgres and redis containers in parallel, waits for them all to be ready then launches the ckan container. This takes a while.*

real    1m32.681s
user    0m20.008s
sys     0m0.333s

If we launch all containers in parallel we get a running ckan in much less time.*

real    0m48.344s
user    0m8.595s
sys     0m0.186s

This could result in an error if ckan starts accessing the database too early, so this change has only been applied to the docker-compose.dev.yml file for now. For such a large improvement I think it's worth considering.

FIXME this could be made reliable by checking for the container status inside the ckan container.

* both measurements include an ~11s shutdown time

@wardi wardi mentioned this pull request Apr 25, 2024
@kowh-ai kowh-ai self-assigned this Apr 25, 2024
Copy link
Contributor

@kowh-ai kowh-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, rudimentary testing, no failures of the CKAN container

@kowh-ai kowh-ai merged commit cdc62cc into master Apr 26, 2024
1 check passed
@wardi
Copy link
Contributor Author

wardi commented Apr 29, 2024

Unfortunately this creates an issue where docker compose run doesn't bring up the required containers, sending a fix in #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants