diff --git a/app/pom.xml b/app/pom.xml index fbba3eaa..695f2647 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -53,6 +53,7 @@ + talkforgeai org.springframework.boot diff --git a/app/src/main/resources/application.properties b/app/src/main/resources/application.properties index 1fc3f2b8..872e2c83 100644 --- a/app/src/main/resources/application.properties +++ b/app/src/main/resources/application.properties @@ -15,6 +15,8 @@ # server.port=${TALKFORGEAI_SERVER_PORT:8090} server.servlet.async.timeout=60000 +### Data ### +talkforgeai.datadir=${TALKFORGEAI_DATADIR:${user.home}/.talkforgeai} ### Upload ### spring.servlet.multipart.max-file-size=5MB spring.servlet.multipart.max-request-size=5MB @@ -32,7 +34,7 @@ openai.postman-request-id=${POSTMAN_OPENAI_REQUEST_ID} elevenlabs.api-key=${TALKFORGEAI_ELEVENLABS_APIKEY} elevenlabs.api-url=https://api.elevenlabs.io ### Database ### -spring.datasource.url=jdbc:sqlite:${TALKFORGEAI_DATADIR:${user.home}/.talkforgeai}/talkforgeai.db +spring.datasource.url=jdbc:sqlite:${talkforgeai.datadir}/talkforgeai.db spring.datasource.driverClassName=org.sqlite.JDBC spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect spring.jpa.hibernate.ddl-auto=validate @@ -52,6 +54,6 @@ logging.level.com.talkforgeai=${TALKFORGEAI_LOGLEVEL:INFO} logging.pattern.console=%d{dd-MM-yyyy HH:mm:ss.SSS} %magenta([%thread]) %highlight(%-5level) %logger{36}.%M - %msg%n logging.pattern.file=%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n # Log File Einstellungen -logging.file.name=${TALKFORGEAI_DATADIR:${user.home}/.talkforgeai}/logs/talkforgeai.log +logging.file.name=${talkforgeai.datadir}/logs/talkforgeai.log logging.logback.rollingpolicy.max-file-size=10MB logging.logback.rollingpolicy.max-history=10 \ No newline at end of file diff --git a/backend/src/main/java/com/talkforgeai/backend/storage/FileStorageService.java b/backend/src/main/java/com/talkforgeai/backend/storage/FileStorageService.java index 5d234c78..79361f8e 100644 --- a/backend/src/main/java/com/talkforgeai/backend/storage/FileStorageService.java +++ b/backend/src/main/java/com/talkforgeai/backend/storage/FileStorageService.java @@ -33,7 +33,7 @@ public class FileStorageService { public static final String TALK_FORGE_DIR = ".talkforgeai"; public static final Logger LOGGER = LoggerFactory.getLogger(FileStorageService.class); - @Value("${TALKFORGEAI_DATADIR:}") + @Value("${talkforgeai.datadir:}") private String configDataDirectory; private Path dataDirectory;