Skip to content

Instantly share code, notes, and snippets.

@jleclanche
Created January 30, 2020 12:29
Show Gist options
  • Save jleclanche/68ce725a2b99d27f4c61040fdfd348b7 to your computer and use it in GitHub Desktop.
Save jleclanche/68ce725a2b99d27f4c61040fdfd348b7 to your computer and use it in GitHub Desktop.
postgres keycloak
--- standalone.xml 2020-01-30 10:24:42.387997193 +0100
+++ archlinux.xml 2020-01-30 11:13:42.877321148 +0100
@@ -1,5 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
+<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="urn:jboss:domain:10.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
@@ -130,23 +129,18 @@
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
<subsystem xmlns="urn:jboss:domain:datasources:5.0">
<datasources>
- <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
- <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
- <driver>h2</driver>
- <security>
- <user-name>sa</user-name>
- <password>sa</password>
- </security>
- </datasource>
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
- <connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
- <driver>h2</driver>
+ <connection-url>jdbc:postgresql://localhost:5432/keycloak</connection-url>
+ <driver>postgresql</driver>
<security>
- <user-name>sa</user-name>
- <password>sa</password>
+ <user-name>keycloak</user-name>
+ <password>keycloak</password>
</security>
</datasource>
<drivers>
+ <driver name="postgresql" module="org.postgresql">
+ <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
+ </driver>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment