#How do service bindings influence
1 messages · Page 1 of 1 (latest)
I wonder if folks use the entrypoint.sh script with dbs like postgres, mysql to execuate script from a scripts.d directory, etc...seems like yes.
From ChatGPT:
Common Practices
Mounting a Volume for SQL Scripts: A well-known directory inside the container (e.g.,/docker-entrypoint-initdb.d/) is often used. SQL scripts placed in this directory are executed when the container starts, especially in official database images like MySQL, PostgreSQL, and MariaDB.For example, PostgreSQL and MySQL official images automatically run
.sql, .sh, and .sql.gzscripts located in/docker-entrypoint-initdb.d/.
cc @chrome linden
I do the same ☝️
Regardless, it's a question I've been thinking about lately as well.
Yeah that's totally fine
But at the same time, ideally I wouldnt need that shell script glue
So I'm wondering what the "maximum dagger" approach would look like
One thing I do: https://daggerverse.dev/mod/github.com/sagikazarmark/daggerverse/postgres@89a5a332f2ad1a182e6e8172f6872c4ab3ada507#Postgres.withDatabase