Compare commits
1 commit
main
...
build-tomc
Author | SHA1 | Date | |
---|---|---|---|
|
04379c9091 |
5 changed files with 25 additions and 2 deletions
7
Dockerfile
Normal file
7
Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
FROM gradle:jdk17-jammy as build
|
||||
WORKDIR /home/gradle/ModeratorElection
|
||||
COPY . /home/gradle/ModeratorElection
|
||||
RUN ./gradlew -Dvaadin.productionMode=true -Dvaadin.force.production.build=true -Pproduction clean war
|
||||
|
||||
FROM tomcat:11.0
|
||||
COPY --from=build home/gradle/ModeratorElection/build/libs/ModeratorElection-plain.war /usr/local/tomcat/webapps/ROOT.war
|
|
@ -10,6 +10,7 @@ plugins {
|
|||
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
|
||||
id 'java'
|
||||
id 'com.vaadin'
|
||||
id 'war'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -32,6 +33,7 @@ dependencies {
|
|||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
|
@ -40,6 +42,10 @@ dependencyManagement {
|
|||
}
|
||||
}
|
||||
|
||||
war {
|
||||
enabled=true
|
||||
}
|
||||
|
||||
test{
|
||||
useJUnitPlatform()
|
||||
}
|
2
build.sh
Normal file
2
build.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
docker image build . -t moderator
|
|
@ -2,9 +2,17 @@ package com.ModeratorElection;
|
|||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
|
||||
@SpringBootApplication
|
||||
public class MEApplication {
|
||||
public class MEApplication extends SpringBootServletInitializer {
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(MEApplication.class);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MEApplication.class, args);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ spring.mustache.check-template-location = false
|
|||
vaadin.launch-browser=true
|
||||
# To improve the performance during development.
|
||||
# For more information https://vaadin.com/docs/latest/integrations/spring/configuration#special-configuration-parameters
|
||||
vaadin.allowed-packages = com.vaadin,org.vaadin,dev.hilla,com.example.application
|
||||
vaadin.allowed-packages = com.vaadin,org.vaadin,dev.hilla,com.ModeratorElection.ModeratorElection.ModeratorElectionApplication
|
||||
spring.jpa.defer-datasource-initialization = true
|
||||
membernames=${MEMBERNAMES:Micha,Ansgar,Clemens,Mattis,Erik,Mirco}
|
||||
|
|
Loading…
Reference in a new issue