Skip to content

Commit

Permalink
chore: add password entrypoint to keycloak and api db
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Dec 10, 2024
1 parent f4167af commit f928f1b
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/api-db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions services/api-db/Dockerfile.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions services/api-db/mariadb-password.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -eo pipefail

if [ ${API_DB_PASSWORD+x} ]; then
export MARIADB_PASSOWRD=${API_DB_PASSWORD}
fi
7 changes: 7 additions & 0 deletions services/api-db/mysql-password.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -eo pipefail

if [ ${API_DB_PASSWORD+x} ]; then
export MYSQL_PASSOWRD=${API_DB_PASSWORD}
fi
1 change: 1 addition & 0 deletions services/keycloak-db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions services/keycloak-db/Dockerfile.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions services/keycloak-db/mariadb-password.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -eo pipefail

if [ ${KEYCLOAK_DB_PASSWORD+x} ]; then
export MARIADB_PASSOWRD=${KEYCLOAK_DB_PASSWORD}
fi
7 changes: 7 additions & 0 deletions services/keycloak-db/mysql-password.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -eo pipefail

if [ ${KEYCLOAK_DB_PASSWORD+x} ]; then
export MYSQL_PASSOWRD=${KEYCLOAK_DB_PASSWORD}
fi

0 comments on commit f928f1b

Please sign in to comment.