-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
RequestRequest for image modification or featureRequest for image modification or feature
Description
Currently, scripts under docker-entrypoint-initdb.d are run with -v ON_ERROR_STOP=1
.
This seems sensible, as we by default don't want a the DB to initialize to an indeterminate state with silently failing init scripts. However, even if the container stops, the volume is still initialized, so that on the next restart (which will happen silently in most use cases due to restart policies), the database will start without complaints, with a partially initialized database.
Suggested fixes :
- wipe the database if init scripts fail, so that a running container guarantees the database was successfully initialized
- add an option (env var) to run scripts with
-v ON_ERROR_STOP=0
for users who still want to continue even if scripts errors (see Stop the container if running docker-entrypoint-initdb.d scripts error out #432 (comment)), in which case failing fast on errors is damaging (e.g. when including a partially compatible database dump)
Metadata
Metadata
Assignees
Labels
RequestRequest for image modification or featureRequest for image modification or feature