Bootstrapp keycloak
This commit is contained in:
parent
38999c57c4
commit
ee5e0ae84c
@ -1,3 +1,9 @@
|
||||
FROM jboss/keycloak:9.0.0
|
||||
|
||||
EXPOSE 80:8080
|
||||
EXPOSE 8080
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
COPY sbin/* /sbin/
|
||||
|
||||
ENTRYPOINT ["/sbin/dokku-entrypoint.sh"]
|
||||
|
@ -1,3 +1,3 @@
|
||||
# keycloak-dokku
|
||||
|
||||
See [gitea-experiment repository](https://gitlab.com/autonomic-cooperative/gitea-experiment) for deploy instructions.
|
||||
See [gitea-experiment repository](https://gitlab.com/autonomic-cooperative/gitea-experiment) for more.
|
||||
|
6
app.json
6
app.json
@ -1,9 +1,5 @@
|
||||
{
|
||||
"name": "keycloak",
|
||||
"description": "Open Source Identity and Access Management",
|
||||
"repository": "https://gitlab.com/autonomic-cooperative/keycloak-dokku",
|
||||
"success_url": "/",
|
||||
"dokku": {
|
||||
"plugins": []
|
||||
}
|
||||
"repository": "https://gitlab.com/autonomic-cooperative/keycloak-dokku"
|
||||
}
|
||||
|
26
sbin/dokku-entrypoint.sh
Executable file
26
sbin/dokku-entrypoint.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
setup_root_user() {
|
||||
set -eu
|
||||
|
||||
if ! grep -q "$ADMIN_USER" /opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json; then
|
||||
if /opt/jboss/keycloak/bin/add-user-keycloak.sh -r master -u "$ADMIN_USER" -p "$ADMIN_PASS"; then
|
||||
echo "=====> root user added"
|
||||
else
|
||||
echo "=====> Failed to add root user"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
set -eu
|
||||
|
||||
setup_root_user
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
/usr/bin/entrypoint "$@"
|
Reference in New Issue
Block a user