Skip to content

Commit

Permalink
Add entrypoint script to load environment variables and start container
Browse files Browse the repository at this point in the history
  • Loading branch information
Awambeng committed Dec 10, 2024
1 parent 97b52c8 commit 8de327b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -e

# Source the load_env.sh script to load environment variables
echo "Loading environment variables..."
. /opt/keycloak/load_env.sh

# Ensure required variables are set
if [ -z "$KC_INSTALL_DIR" ] || [ -z "$KC_START" ]; then
echo "Required environment variables (KC_INSTALL_DIR, KC_START) are not set."
exit 1
fi

# Start Keycloak
echo "Starting Keycloak..."
exec $KC_INSTALL_DIR/bin/kc.sh $KC_START $KC_DB_OPT --features=oid4vc-vci
echo "$KC_INSTALL_DIR/bin/kc.sh $KC_START $KC_DB_OPT --features=oid4vc-vci"

0 comments on commit 8de327b

Please sign in to comment.