Can you add a custom SQL "initialization" hook into entrypoint.sh?
Background:
Currently when starting entrypoint.sh will execute schema.sql and then immediately start pdns.
In my use case I need to add some entries into the supermasters table between DB initialization and service start.
So far my options are to replace either entrypoint.sh or schema.sql in my own Dockerfile. As soon as I do that and you update your Image I would then risk overwriting an improved file with a file based on an older version.
Can you include something like this in your script?
if [ -f "/etc/pdns/post-schema.sql" ]; then
cat /etc/pdns/post-schema.sql | $MYSQLCMD
fi
... immediately after "sending" schema.sql to MySQL?
I would then be able to just add a post-schema.sql that would be triggered on database init.
Can you add a custom SQL "initialization" hook into entrypoint.sh?
Background: Currently when starting entrypoint.sh will execute schema.sql and then immediately start pdns. In my use case I need to add some entries into the supermasters table between DB initialization and service start.
So far my options are to replace either entrypoint.sh or schema.sql in my own Dockerfile. As soon as I do that and you update your Image I would then risk overwriting an improved file with a file based on an older version.
Can you include something like this in your script?
... immediately after "sending" schema.sql to MySQL?
I would then be able to just add a post-schema.sql that would be triggered on database init.