#680: warning when using H2 database

This commit is contained in:
bgamard 2023-04-22 00:47:01 +02:00
parent 4634def93e
commit dd36e08d7d
2 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,7 @@ A demo is available at [demo.teedy.io](https://demo.teedy.io)
# Install with Docker
A preconfigured Docker image is available, including OCR and media conversion tools, listening on port 8080. If no PostgreSQL config is provided, the database is an embedded H2 database. The H2 embedded database should only be used for testing. For production usage use the provided postgreSQL configuration (check the docker-compose example)
A preconfigured Docker image is available, including OCR and media conversion tools, listening on port 8080. If no PostgreSQL config is provided, the database is an embedded H2 database. The H2 embedded database should only be used for testing. For production usage use the provided PostgreSQL configuration (check the Docker Compose example)
**The default admin password is "admin". Don't forget to change it before going to production.**

View File

@ -85,6 +85,7 @@ public final class EMF {
Path dbDirectory = DirectoryUtil.getDbDirectory();
String dbFile = dbDirectory.resolve("docs").toAbsolutePath().toString();
if (Strings.isNullOrEmpty(databaseUrl)) {
log.warn("Using an embedded H2 database. Only suitable for testing purpose, not for production!");
props.put("hibernate.connection.driver_class", "org.h2.Driver");
props.put("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
props.put("hibernate.connection.url", "jdbc:h2:file:" + dbFile + ";CACHE_SIZE=65536;LOCK_TIMEOUT=10000");