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

Fewer dependencies for the container image #490

Merged
merged 4 commits into from
Apr 2, 2023

Conversation

oyvindhagberg
Copy link
Contributor

@oyvindhagberg oyvindhagberg commented Mar 28, 2023

This PR does the following:

  • The entrypoint in the container image will create the CITEXT extension in the database if needed. Previously, that had to be done before starting the container.
  • The container image is built with default mregsite and logs directories, so it can run without these being mounted into it. Previously it would exit unless these were mounted in.
  • A docker-compose.yml file is added to the repo.
  • The section about Docker in the README file is updated. Also add names of more contributors.
  • The container-image.yml workflow is modified to trigger on pushes to all branches, but only push the built image to ghcr.io if the branch is master. This way, we get to test that workflow on new code before merging into master.
    Done in 749d096

@coveralls
Copy link
Collaborator

coveralls commented Mar 28, 2023

Coverage Status

Coverage: 98.864%. Remained the same when pulling 121566e on self-reliant-container-2023w13 into 749d096 on master.

@terjekv
Copy link
Collaborator

terjekv commented Mar 29, 2023

This got me thinking... Should we name and/or tag the artifacts better? Naming them something like release and master, while tagging with release number and commit hash, so it's a bit clearer what container one is running?

- The entrypoint in the container image will create the CITEXT
  extension in the database if needed.
- The container image is built with default mregsite and logs
  directories, so it can run without these being mounted into it.
- A docker-compose.yml file is added to the repo.
- The section about Docker in the README file is updated.
When using entrypoint-test.sh, the CITEXT extension ended up being
created in the regular mreg database, when it needs to be created in the
template1 database so it propagates to the temporary database created by
manage.py test.
@oyvindhagberg
Copy link
Contributor Author

This got me thinking... Should we name and/or tag the artifacts better? Naming them something like release and master, while tagging with release number and commit hash, so it's a bit clearer what container one is running?

Good idea, let's do that, but not in this pull request. I created an issue

Copy link
Collaborator

@terjekv terjekv left a comment

Choose a reason for hiding this comment

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

Looks good to me. The create_citext_extension is great to have.

Also, add a few words to README.md about dependencies for PostgreSQL
@terjekv terjekv merged commit 6265089 into master Apr 2, 2023
@oyvindhagberg oyvindhagberg deleted the self-reliant-container-2023w13 branch April 3, 2023 07:10
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.

3 participants