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

add initialization example script #481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aushacker
Copy link

@aushacker aushacker commented Dec 13, 2022

A simple example showing how to configure a database with some test data.

When using ephemeral storage the database name specified by POSTGRESQL_DATABASE must be different from that created in the user provided script, otherwise the container will crash loop. This is due to the default scripts hard failing when trying to create a database that the user supplied init script has already created.

See issue #296 for narrative (known problem).

@phracek
Copy link
Member

phracek commented Jan 2, 2023

[test-all]

Copy link
Member

@phracek phracek left a comment

Choose a reason for hiding this comment

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

Container tests are passing. Unfortunately, I am not a database expert. @hhorak @fila43 WDYT?
As soon as @fila43 or @hhorak approve this pull request, we can merge it.

@aushacker Do we have a test for it? If not please create at least one.

@aushacker
Copy link
Author

@phracek Have had a look through the available tests, none of them seem to match the required procedure.

What is needed to test would be something like:

  1. Build base image
  2. Create a new image, layering in postgresql-init/initialize.sh
  3. Spin up the image from 2 in podman/docker
  4. Use a postgresql client to connect and query the quotes database

How does that fit in with the current testing procedure?

@fila43
Copy link
Member

fila43 commented Jan 24, 2023

I do not see any problem with proposed example

@fila43
Copy link
Member

fila43 commented Mar 30, 2023

[test-all]

@phracek
Copy link
Member

phracek commented Aug 28, 2023

@aushacker Thank you for this pull request. Please do following steps:

  • rebase it agains the master
  • call make clean-versions
  • call make generate-all which is mandatory, because of distgen check is failing. It means that generated changes are different then we expect it.

Copy link

github-actions bot commented Nov 7, 2024

Pull Request validation

Failed

🔴 Review - Missing review from a member (2 required)

Success

🟢 CI - All checks have passed

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

Successfully merging this pull request may close these issues.

3 participants