Skip to content

Commit

Permalink
⚡ Deploy # 2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbatovK committed Mar 25, 2024
1 parent 7709907 commit e99bcce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM gradle:8-jdk17 as builder
USER root
WORKDIR /builder
ADD . /builder
RUN gradle build --stacktrace
RUN gradle clean build -P"vaadin.productionMode" --stacktrace

FROM openjdk:17-jdk-slim
WORKDIR /app
Expand Down
18 changes: 16 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.google.cloud.tools.jib.gradle.JibExtension
import com.vaadin.gradle.vaadin
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
Expand Down Expand Up @@ -48,7 +49,16 @@ configurations {

repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") }
maven { setUrl("https://repo.spring.io/milestone") }
maven { setUrl("https://maven.vaadin.com/vaadin-addons") }
}

vaadin.productionMode = true

vaadin {
forceProductionBuild = true
productionMode = true
}

dependencies {
Expand All @@ -63,7 +73,11 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-elasticsearch")

// Vaadin
implementation("com.vaadin:vaadin-spring-boot-starter")
implementation("com.vaadin:vaadin-spring-boot-starter") {
if (vaadin.effective.productionMode.get()) {
exclude(module = "vaadin-dev")
}
}

// Kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect")
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ tender-config:
timeout-ms: 10000

vaadin:
productionMode: true
original:
frontend:
resources: true
exclude-urls: /swagger-ui/*, /api/*, /swagger-ui/index.html, /api-docs, v3/api-docs
load-on-startup: true
allowed-packages: com.albatros.springsecurity.presentation.route

0 comments on commit e99bcce

Please sign in to comment.