Open snicoll opened 4 weeks ago
Hi!
Could you add some debug output to ensure that the init script is being executed?
Could you add some debug output to ensure that the init script is being executed?
I can do that, but that's just a workaround for the reported issue. My ask is whether not supporting CLICKHOUSE_DB
is intentional. If it is, what is the recommended way to create a custom DB on startup?
Hi,
Yes, in principle it was intentional to avoid adding too much complexity to the initial script. I could also see that the database creation has several options (engines, clustered or not clustered, sharding...) that we weren't sure a default database would cover the user needs. At the moment, the recommended way is to mount your custom init scripts to ensure that the database has the expected settings.
However, if this is something that the community is very interested, it could be possible to change the clickhouse_initialize
function to support the CLICKHOUSE_DB param. I will leave the ticket open to see if we have more feedback from the community.
Name and Version
bitnami/clickhouse:latest
What architecture are you using?
arm64
What steps will reproduce the bug?
Setting 'CLICKHOUSE_DB=mydatabase' should create a
mydatabase
. That's what the regular image does but, for some reason, the bitnami version does not.Looking at the doc, it seems that it is intentional.
What is the expected behavior?
mydatabase
should be created.What do you see instead?
Additional information
I've tried to setup a script that creates the database, but that didn't work either.
I created an
initdb
folder with the followingcreate-database.sh
file (it is executable):My docker compose file is as follows:
On startup, I am getting: