-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use Docker Compose and add test that the server comes up #175
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…benchdb container - switch base image to one with Node.js 21 - add health check to wait for postgres to be avaiable. Though, this is not fully sufficient, because the healthcheck will return true when postgres is merely preparing the database and then still restarts - add .dockerignore Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
- in the docker setup, the postgres database may not yet be available, so, we’ll retry 5 times to connect to it Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Needed to move up, because otherwise the /:projectSlug endpoint would be selected. Signed-off-by: Stefan Marr <git@stefan-marr.de>
- also update action versions - rely on docker compose to also build the images Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Closed
smarr
force-pushed
the
compose
branch
2 times, most recently
from
January 20, 2024 14:27
4947b2e
to
ac2de23
Compare
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes how the docker-based setup works.
Instead of starting the PostgreSQL server and the Node.js server in the same container, docker-compose.yml defines both as separate containers.
This should improve the ability to use standard docker tooling and container management, and hopefully also avoid issues with the system not starting up properly.
The PR also adds code to wait for Postgres to come up properly, and retry connecting to it.
With Docker, this should be usable with:
For Podman users, podman-compose is needed:
pip3 install podman-compose # if not already available podman-compose up
The GitLab CI setup for benchmarking is not using podman-compose, and instead manually starts both containers. Unfortunately, podman-compose is not as full feature as needed. It doesn't fully support its
--abort-on-container-exit
/--exit-code-from
, and dealing with environment variables is problematic, too.