add initialization example script
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).
[test-all]
@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:
- Build base image
- Create a new image, layering in postgresql-init/initialize.sh
- Spin up the image from 2 in podman/docker
- Use a postgresql client to connect and query the quotes database
How does that fit in with the current testing procedure?
I do not see any problem with proposed example
[test-all]
@aushacker Thank you for this pull request. Please do following steps:
- rebase it agains the master
- call
make clean-versions - call
make generate-allwhich is mandatory, because ofdistgen checkis failing. It means that generated changes are different then we expect it.
Pull Request validation
Failed
🔴 Review - Missing review from a member (1 required)
Success
🟢 CI - All checks have passed