Configuration
Blazing KRaft supports multiple datasources, you only need to inject the env varibale BLAZINGKRAFT_DATASOURCE_TYPE
which can be one of the following:
H2
MYSQL
POSTGRES
SQLSERVER
MARIADB
For The H2
, simply by specifying the datasource type, Blazing KRaft will automatically create the H2 database
in the /var/blazingkraft/database
mounted volume, as for the remaining datasources,
you'll have to also specify the url, username and password.
H2
BLAZINGKRAFT_DATASOURCE_TYPE: H2 # [H2, POSTGRESQL, MYSQL, MARIADB, SQLSERVER]
MYSQL
BLAZINGKRAFT_DATASOURCE_TYPE: MYSQL
BLAZINGKRAFT_DATASOURCE_MYSQL_URL: jdbc:mysql://localhost:3306/blazingkraft
BLAZINGKRAFT_DATASOURCE_MYSQL_USERNAME: root
BLAZINGKRAFT_DATASOURCE_MYSQL_PASSWORD: mysql
POSTGRES
BLAZINGKRAFT_DATASOURCE_TYPE: POSTGRESQL
BLAZINGKRAFT_DATASOURCE_POSTGRESQL_URL: jdbc:postgresql://localhost:5432/blazingkraft
BLAZINGKRAFT_DATASOURCE_POSTGRESQL_USERNAME: postgres
BLAZINGKRAFT_DATASOURCE_POSTGRESQL_PASSWORD: postgres
SQLSERVER
BLAZINGKRAFT_DATASOURCE_TYPE: MARIADB
BLAZINGKRAFT_DATASOURCE_MARIADB_URL: jdbc:mariadb://localhost:3306/blazingkraft
BLAZINGKRAFT_DATASOURCE_MARIADB_USERNAME: root
BLAZINGKRAFT_DATASOURCE_MARIADB_PASSWORD: mariadb
MARIADB
BLAZINGKRAFT_DATASOURCE_TYPE: SQLSERVER
BLAZINGKRAFT_DATASOURCE_SQLSERVER_URL: jdbc:sqlserver://;serverName=localhost;databaseName=blazingkraft;encrypt=true;trustServerCertificate=true
BLAZINGKRAFT_DATASOURCE_SQLSERVER_USERNAME: SA
BLAZINGKRAFT_DATASOURCE_SQLSERVER_PASSWORD: SqlServer@123