refactor: remove prod profile

merged into default
This commit is contained in:
Gauthier Roebroeck 2020-03-05 20:34:18 +08:00
parent 3b46588dcb
commit a88f577b53
8 changed files with 18 additions and 19 deletions

View file

@ -4,5 +4,5 @@ ARG DEPENDENCY=target/dependency
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY ${DEPENDENCY}/META-INF /app/META-INF
COPY ${DEPENDENCY}/BOOT-INF/classes /app
ENV SPRING_PROFILES_ACTIVE=prod,docker
ENV SPRING_PROFILES_ACTIVE=docker
ENTRYPOINT ["java","-cp","app:app/lib/*","org.gotson.komga.ApplicationKt"]

View file

@ -2,13 +2,11 @@ package org.gotson.komga.infrastructure.swagger
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Profile
import org.springframework.security.core.annotation.AuthenticationPrincipal
import springfox.documentation.spi.DocumentationType
import springfox.documentation.spring.web.plugins.Docket
import springfox.documentation.swagger2.annotations.EnableSwagger2
@Profile("dev", "prod")
@Configuration
@EnableSwagger2
class SwaggerConfiguration {
@ -18,4 +16,4 @@ class SwaggerConfiguration {
return Docket(DocumentationType.SWAGGER_2)
.ignoredParameterTypes(AuthenticationPrincipal::class.java)
}
}
}

View file

@ -15,7 +15,7 @@ import org.springframework.stereotype.Controller
private val logger = KotlinLogging.logger {}
@Profile("(dev | prod) & !claim")
@Profile("!(test | claim)")
@Controller
class InitialUserController(
private val userDetailsLifecycle: KomgaUserDetailsLifecycle,
@ -52,7 +52,7 @@ class InitialUsersDevConfiguration {
}
@Configuration
@Profile("prod")
@Profile("!dev")
class InitialUsersProdConfiguration {
@Bean
fun initialUsers() = listOf(

View file

@ -11,7 +11,7 @@ import java.util.concurrent.RejectedExecutionException
private val logger = KotlinLogging.logger {}
@Profile("dev", "prod")
@Profile("!test")
@Controller
class PeriodicScannerController(
private val asyncOrchestrator: AsyncOrchestrator

View file

@ -5,10 +5,8 @@ komga:
remember-me:
key: changeMe!
validity: 2592000 # 1 month
# libraries-scan-directory-exclusions:
# - "#recycle"
# - "@eaDir"
# libraries-scan-cron: "*/5 * * * * ?"
# libraries-scan-cron: "*/5 * * * * ?" #every 5 seconds
libraries-scan-cron: "-" #disable
spring:
jpa:
properties:

View file

@ -2,5 +2,3 @@ spring:
datasource:
url: jdbc:h2:/config/database.h2
logging.file.name: /config/logs/komga.log
komga:
libraries-scan-cron: "0 */15 * * * ?"

View file

@ -1,6 +0,0 @@
logging:
file:
max-history: 10
name: komga.log
komga:
libraries-scan-cron: "0 */15 * * * ?"

View file

@ -1,5 +1,16 @@
application.version: ${version}
logging:
file:
max-history: 10
name: komga.log
komga:
libraries-scan-cron: "0 */15 * * * ?"
libraries-scan-directory-exclusions:
- "#recycle"
- "@eaDir"
spring:
# cache:
# caffeine-spec: maximumSize=500,expireAfterWrite=300s