-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[bitnami/postgresql-repmgr] Support running scripts on primary node when container starts #82116
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sean Teo <[email protected]>
fbd9ead
to
3446058
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! thanks a lot @sawntoe for your contribution! I appreciate it a lot.
I've just left a comment, Could you give it a glance?
Hi @fmulero, so sorry, I am unable to see any comments on the code, may I ask if its still a draft? Thanks so much! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't add the comment to the review. My failure.
# Returns: | ||
# None | ||
######################### | ||
postgresql_custom_start_scripts() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost the same code as in postgresql_custom_init_scripts
:
containers/bitnami/postgresql/17/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh
Line 784 in da31f8d
postgresql_custom_init_scripts() { |
To avoid duplication, could you follow the same approach we've used in mariadb
?
containers/bitnami/mariadb/11.4/debian-12/rootfs/opt/bitnami/scripts/libmariadb.sh
Lines 381 to 390 in da31f8d
######################## | |
# Run custom scripts | |
# Globals: | |
# DB_* | |
# Arguments: | |
# $1 - 'init' or 'start' ('init' runs on first container start, 'start' runs everytime the container starts) | |
# Returns: | |
# None | |
######################### | |
mysql_custom_scripts() { |
Hi, so sorry for the holdup, i've been quite busy. Just a question regarding the handling of scripts: |
Good question. I think that could be done in a different PR, that function only supports |
Revival of #70737
Description of the change
This adds the ability to run scripts on startup always, a feature that is present in other containers such as mariadb with the
/docker-entrypoint-startdb.d
endpointBenefits
It is currently a huge pain in the behind to run scripts at startup everytime the container starts, requiring an undocumented change to the entrypoint for which there is no information anywhere
Applicable issues