diff --git a/services/api-db/Dockerfile b/services/api-db/Dockerfile index 9f9a4e0788..b1ff93d3a6 100644 --- a/services/api-db/Dockerfile +++ b/services/api-db/Dockerfile @@ -12,6 +12,7 @@ COPY ./legacy-migration-scripts/* /legacy-migration-scripts/ RUN chown -R mysql /legacy-migration-scripts/ \ && /bin/fix-permissions /legacy-migration-scripts/ +COPY mariadb-password.bash /lagoon/entrypoints/50-mariadb-password.bash RUN sed -i 's/mariadb-init-complete/startup-init-complete/g' /lagoon/entrypoints/9999-mariadb-init.bash USER mysql diff --git a/services/api-db/Dockerfile.mysql b/services/api-db/Dockerfile.mysql index 372e9ea41c..d4fd28c245 100644 --- a/services/api-db/Dockerfile.mysql +++ b/services/api-db/Dockerfile.mysql @@ -11,6 +11,7 @@ COPY ./legacy-migration-scripts/* /legacy-migration-scripts/ RUN chown -R mysql /legacy-migration-scripts/ \ && /bin/fix-permissions /legacy-migration-scripts/ +COPY mysql-password.bash /lagoon/entrypoints/50-mysql-password.bash COPY mysql-init.bash /lagoon/entrypoints/9999-mysql-init.bash USER mysql diff --git a/services/api-db/mariadb-password.bash b/services/api-db/mariadb-password.bash new file mode 100644 index 0000000000..cc4de104a2 --- /dev/null +++ b/services/api-db/mariadb-password.bash @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -eo pipefail + +if [ ${API_DB_PASSWORD+x} ]; then + export MARIADB_PASSOWRD=${API_DB_PASSWORD} +fi \ No newline at end of file diff --git a/services/api-db/mysql-password.bash b/services/api-db/mysql-password.bash new file mode 100644 index 0000000000..45b4474b69 --- /dev/null +++ b/services/api-db/mysql-password.bash @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -eo pipefail + +if [ ${API_DB_PASSWORD+x} ]; then + export MYSQL_PASSOWRD=${API_DB_PASSWORD} +fi \ No newline at end of file diff --git a/services/keycloak-db/Dockerfile b/services/keycloak-db/Dockerfile index da3035388a..351aa1544b 100644 --- a/services/keycloak-db/Dockerfile +++ b/services/keycloak-db/Dockerfile @@ -13,6 +13,7 @@ ENV MARIADB_DATABASE=keycloak \ COPY my_query-cache.cnf /etc/mysql/conf.d/my_query-cache.cnf USER root +COPY mariadb-password.bash /lagoon/entrypoints/50-mariadb-password.bash RUN sed -i 's/mariadb-init-complete/startup-init-complete/g' /lagoon/entrypoints/9999-mariadb-init.bash RUN fix-permissions /etc/mysql/conf.d/ USER mysql diff --git a/services/keycloak-db/Dockerfile.mysql b/services/keycloak-db/Dockerfile.mysql index 5a51cd3b08..6fdc743640 100644 --- a/services/keycloak-db/Dockerfile.mysql +++ b/services/keycloak-db/Dockerfile.mysql @@ -13,6 +13,7 @@ ENV MYSQL_DATABASE=keycloak \ # MYSQL_COLLATION=utf8_general_ci USER root +COPY mysql-password.bash /lagoon/entrypoints/50-mysql-password.bash COPY mysql-init.bash /lagoon/entrypoints/9999-mysql-init.bash USER mysql diff --git a/services/keycloak-db/mariadb-password.bash b/services/keycloak-db/mariadb-password.bash new file mode 100644 index 0000000000..6f8bf4e742 --- /dev/null +++ b/services/keycloak-db/mariadb-password.bash @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -eo pipefail + +if [ ${KEYCLOAK_DB_PASSWORD+x} ]; then + export MARIADB_PASSOWRD=${KEYCLOAK_DB_PASSWORD} +fi \ No newline at end of file diff --git a/services/keycloak-db/mysql-password.bash b/services/keycloak-db/mysql-password.bash new file mode 100644 index 0000000000..a3aee2345b --- /dev/null +++ b/services/keycloak-db/mysql-password.bash @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -eo pipefail + +if [ ${KEYCLOAK_DB_PASSWORD+x} ]; then + export MYSQL_PASSOWRD=${KEYCLOAK_DB_PASSWORD} +fi \ No newline at end of file