2014-10-07 10:33:27 +00:00
#!/bin/bash
2015-05-04 21:16:42 +00:00
# Copy Overlay
cp -r /keycloak-docker-cluster/server-overlay/* $JBOSS_HOME /
# Deploy and configure examples
/keycloak-docker-cluster/shared-files/deploy-examples.sh
2014-10-07 10:33:27 +00:00
# Copy MySQL driver
cd /tmp
mkdir -p mysql/main && mv /mysql-connector-java-5.1.32.jar mysql/main/
cp /keycloak-docker-cluster/shared-files/mysql-module.xml mysql/main/module.xml
mv mysql $JBOSS_MODULES_HOME /com/
2015-08-06 15:29:08 +00:00
# Transform standalone-keycloak-ha.xml
java -jar /usr/share/java/saxon.jar -s:$JBOSS_HOME /standalone/configuration/standalone-keycloak-ha.xml -xsl:/keycloak-docker-cluster/shared-files/standaloneXmlChanges.xsl -o:$JBOSS_HOME /standalone/configuration/standalone-keycloak-ha.xml
2014-10-07 10:33:27 +00:00
sed -i "s|#JAVA_OPTS=\"\$JAVA_OPTS -agentlib:jdwp=transport=dt_socket|JAVA_OPTS=\"\$JAVA_OPTS -agentlib:jdwp=transport=dt_socket|" $JBOSS_HOME /bin/standalone.conf
cp /keycloak-docker-cluster/shared-files/mysql-keycloak-ds.xml $JBOSS_HOME /standalone/deployments/
2015-05-04 21:16:42 +00:00
# Enable Infinispan provider
2015-08-06 15:29:08 +00:00
#sed -i "s|\"provider\".*: \"mem\"|\"provider\": \"infinispan\"|" $JBOSS_HOME/standalone/configuration/keycloak-server.json
#sed -i -e "s/\"connectionsJpa\"/\n \"connectionsInfinispan\": \{\n \"default\" : \{\n \"cacheContainer\" : \"java:jboss\/infinispan\/Keycloak\"\n \}\n \},\n &/" $JBOSS_HOME/standalone/configuration/keycloak-server.json