fix: put the admin password in the container, also add restore capabilities
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d432a45c21
commit
157d3beaab
|
@ -5,7 +5,7 @@ services:
|
|||
app:
|
||||
image: "keycloak/keycloak:20.0.3"
|
||||
entrypoint: >
|
||||
bash -c "KC_DB_PASSWORD=\"$$(cat /run/secrets/db_password)\" /opt/keycloak/bin/kc.sh start"
|
||||
bash -c "KEYCLOAK_ADMIN_PASSWORD=\"$$(cat /run/secrets/admin_password)\" KC_DB_PASSWORD=\"$$(cat /run/secrets/db_password)\" /opt/keycloak/bin/kc.sh start"
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
|
@ -66,6 +66,9 @@ services:
|
|||
backupbot.backup.path: "/tmp/dump.sql.gz"
|
||||
backupbot.backup.post-hook: "rm -f /tmp/dump.sql.gz"
|
||||
backupbot.backup.pre-hook: "sh -c 'mysqldump -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak | gzip > /tmp/dump.sql.gz'"
|
||||
backupbot.restore.pre-hook: "sh -c 'cd /tmp && gzip -d dump.sql.gz'"
|
||||
backupbot.restore: "true"
|
||||
backupbot.restore.post-hook: "sh -c 'mysql -u root -p\"$$(cat /run/secrets/db_root_password)\" keycloak < /tmp/dump.sql && rm -f /tmp/dump.sql'"
|
||||
|
||||
networks:
|
||||
internal:
|
||||
|
|
Loading…
Reference in New Issue