Skip to content

Commit

Permalink
Added data-dir property
Browse files Browse the repository at this point in the history
  • Loading branch information
jschm42 committed Nov 4, 2023
1 parent 94fb8d3 commit 84f8b6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
</dependencies>

<build>
<finalName>talkforgeai</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84f8b6d

Please sign in to comment.