env variables pass to config
This commit is contained in:
parent
c2663c960a
commit
f730ac7500
5 changed files with 13 additions and 24 deletions
|
@ -7,7 +7,9 @@ import org.springframework.stereotype.Component
|
|||
|
||||
|
||||
@Component
|
||||
class NextcloudDLNA(private val dlnaService: DlnaService) {
|
||||
class NextcloudDLNA(
|
||||
private val dlnaService: DlnaService
|
||||
) {
|
||||
private val upnpService: UpnpService = dlnaService.start()
|
||||
|
||||
@PreDestroy
|
||||
|
|
|
@ -60,7 +60,7 @@ abstract class MyHttpExchangeUpnpStream(
|
|||
logger.debug("Request did not contain entity body")
|
||||
}
|
||||
if (bodyBytes.isNotEmpty()) {
|
||||
logger.info(" Request body: " + requestMessage.body)
|
||||
logger.debug(" Request body: " + requestMessage.body)
|
||||
}
|
||||
val responseMessage = process(requestMessage)
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ import java.util.Objects.*
|
|||
|
||||
@Component
|
||||
class NextcloudConfigDiscovery(
|
||||
@Value("\${nextcloud.filesDir}") val nextcloudDir: String,
|
||||
@Value("\${nextcloud.filesDir}")
|
||||
val nextcloudDir: String,
|
||||
val appConfigRepository: AppConfigRepository
|
||||
) {
|
||||
final var logger = LoggerFactory.getLogger(NextcloudConfigDiscovery::class.java)
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
server:
|
||||
port: 8080
|
||||
interface: eth0
|
||||
friendlyName: NC-DLNA!
|
||||
port: ${NEXTCLOUD_DLNA_SERVER_PORT:8080}
|
||||
interface: ${NEXTCLOUD_DLNA_INTERFACE:eth0}
|
||||
friendlyName: ${NEXTCLOUD_DLNA_FRIENDLY_NAME:Nextcloud-DLNA}
|
||||
|
||||
nextcloud:
|
||||
filesDir: /path/to/your/nextcloud/dir/ending/with/data
|
||||
filesDir: ${NEXTCLOUD_DATA_DIR:/path/to/your/nextcloud/dir/ending/with/data}
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mariadb://localhost:3306/nextcloud
|
||||
username: nextcloud
|
||||
password: nextcloud
|
||||
url: "jdbc:mariadb://${NEXTCLOUD_DB_HOST:localhost}:${NEXTCLOUD_DB_PORT:3306}/${NEXTCLOUD_DB_NAME:nextcloud}"
|
||||
username: ${NEXTCLOUD_DB_USER:nextcloud}
|
||||
password: ${NEXTCLOUD_DB_PASS:nextcloud}
|
||||
driver-class-name: org.mariadb.jdbc.Driver
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: none
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package net.schowek.nextclouddlna
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
|
||||
@SpringBootTest
|
||||
class NextcloudDLNAAppTests {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue