KaDeck requires a database for storing information. An external database such as H2 or PostgreSQL is recommended in a production environment.
If no external database information is supplied, KaDeck will use an internal H2 file-based database.
Supported databases
KaDeck currently supports:
- Postgre SQL Database
- H2 database
Configuring the database connection
The database connection details are passed to KaDeck as environment variables in the form of a JDBC connection string.
Example (with Postgres database):
xeotek_kadeck_db_url=jdbc:postgresql://kadeckweb.eu-central-1.rds.amazonaws.com:5432/kadeckweb
Although username and password can be specified in the JDBC string, the username and password can alternatively be specified using the following environment variables:
xeotek_kadeck_db_username=my_user
xeotek_kadeck_db_password=my_password
User permissions
The user that is supplied to KaDeck must be able to create tables and read/write data.
Database size
A recommended size for the database to start with is 1GB. Depending on the usage and the growing audit logs, the size of the database must be increased.
Comments
If I provide a custom DB URI, for example : jdbc:h2:mem:test_mem, and then try to login, I have the following error in logs :
java.sql.SQLException: Table "USER_TABLE" not found; SQL statement:
SELECT * FROM USER_TABLE WHERE ID = ? [42102-198] Query: SELECT * FROM USER_TABLE WHERE ID = ? Parameters: [admin]
I guess the DB schema is not created/initialized when using a custom DB ? Do I have to create it manually ?
EDIT : After some tests it appears that this issue occurs only when using a in-memory DB... Quite strange
KaDeck automatically creates all required tables on startup. This message should be preceded by other SQL errors. In most cases, the error indicates that the tables could not be created. This can have several reasons:
Can you check the log output again and verify the database user credentials?
The default h2 in-memory credentials are:
Ben
Please sign in to leave a comment.