-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (44 loc) · 1.37 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
repositories {
mavenCentral()
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
classpath("se.transmode.gradle:gradle-docker:1.2")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
apply plugin: se.transmode.gradle.plugins.docker.DockerPlugin
war {
baseName = 'app'
version = '1.0'
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
compile group: 'com.h2database', name:'h2', version: '1.4.194'
compile group: 'org.json', name: 'json', version: '20160212'
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
testCompile "org.springframework.boot:spring-boot-starter-test"
}
bootRun {
addResources = false
if (rootProject.hasProperty('debug')) {
jvmArgs += ['-Xdebug', '-Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n']
}
}
task docker(type: Docker) {
dependsOn bootRepackage
baseImage = 'library/openjdk:8u131-jdk'
tag = 'bmrobin/phish-weather-api'
tagVersion = 'latest'
addFile project.war.archivePath, '/data/app.war'
exposePort 8080
defaultCommand = [ '/usr/bin/java', '-jar', '/data/app.war' ]
}