-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Initialization script when PGData is not empty #1229
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hi @tianon! Thanks for your response. |
You can run
|
Hi @LaurentGoderre unfortunately your solution would not work in my case because there is no role |
@tomera-cyera I believe |
No, I refer to the |
OOh you mean at initialization? |
@LaurentGoderre, yes. you see I need to initialize the db to have a postgres role even when the datadir already exists (a.k.a the db already initialized) |
@tianon @LaurentGoderre what do you think? |
@yuvall-cyera can you please be more specific about what it is you're looking for feedback on? IMO the thread above is pretty clear (if you need one-time initialization, the image has that as-is, and if you need more than that, see the references in #1229 (comment)) |
I know that when the PGData directory is not empty the container skips the initialization and therefore won't run the initialization script in
/docker-entrypoint-initdb.d
I would like to use a way to give the container scripts that will run on startup no matter what (for example to create a role
postgres
if one does not exist already)The text was updated successfully, but these errors were encountered: