From 95301b34362a965e8a8ebe1ab5da4ffb6da53140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20S=CC=A7enay?= Date: Wed, 11 Oct 2023 18:30:42 +0300 Subject: [PATCH 1/2] Fix typo in postgresql document --- docs/modules/postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/postgres.md b/docs/modules/postgres.md index 25cc48bb83..0614b689b4 100644 --- a/docs/modules/postgres.md +++ b/docs/modules/postgres.md @@ -51,7 +51,7 @@ If you need to set a different database, and its credentials, you can use the `W #### Init Scripts -If you would like to do additional initialization in the Postgres container, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts to the container request with the `WithInitScript` function. +If you would like to do additional initialization in the Postgres container, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts to the container request with the `WithInitScripts` function. Those files will be copied after the container is created but before it's started under `/docker-entrypoint-initdb.d`. According to Postgres Docker image, it will run any `*.sql` files, run any executable `*.sh` scripts, and source any non-executable `*.sh` scripts found in that directory to do further initialization before starting the service. From c2366bf4e35f2861cb45dd04e7d8ec088c2e8395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20S=CC=A7enay?= Date: Wed, 11 Oct 2023 18:33:23 +0300 Subject: [PATCH 2/2] Add function name for init scripts to mariadb document to be same as other documents --- docs/modules/mariadb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/mariadb.md b/docs/modules/mariadb.md index 0ccd6e26d1..bb2eb63de6 100644 --- a/docs/modules/mariadb.md +++ b/docs/modules/mariadb.md @@ -66,7 +66,7 @@ options. #### Init Scripts If you would like to perform DDL or DML operations in the MariaDB container, add one or more `*.sql`, `*.sql.gz`, or `*.sh` -scripts to the container request. Those files will be copied under `/docker-entrypoint-initdb.d`. +scripts to the container request, using the `WithScripts(scriptPaths ...string)`. Those files will be copied under `/docker-entrypoint-initdb.d`. [Example of Init script](../../modules/mariadb/testdata/schema.sql)