From 50dba65d216603f6dc6d2d871bbeaa8b47456595 Mon Sep 17 00:00:00 2001 From: Igor Artamonov Date: Wed, 12 Jun 2019 20:29:35 -0400 Subject: [PATCH] solution: build & deploy to Docker Hub --- build.gradle | 40 +++++++++++++++++++---- src/main/resources/application.properties | 4 --- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 4e9dfda0..8d021b68 100644 --- a/build.gradle +++ b/build.gradle @@ -9,16 +9,18 @@ buildscript { } plugins { + id 'java' + id 'groovy' + id 'idea' + id 'maven' + id 'application' + id 'org.jetbrains.kotlin.jvm' version '1.3.11' + id "com.google.cloud.tools.jib" version "1.3.0" + id 'org.springframework.boot' version '2.1.4.RELEASE' + id 'io.spring.dependency-management' version '1.0.6.RELEASE' } -apply plugin: 'war' -apply plugin: 'java' -apply plugin: 'groovy' -apply plugin: "kotlin" -apply plugin: 'idea' -apply plugin: 'maven' -apply plugin: 'application' group = 'io.emeraldpay.dshackle' version = '0.1-SNAPSHOT' @@ -108,3 +110,27 @@ application { mainClassName = 'io.emeraldpay.dshackle.StarterKt' } +ext { + dockerTags = [project.version].with (true) { + if (!project.version.contains("-SNAPSHOT")) { + add "latest" + } + } +} + +jib { + from { + } + to { + image = 'emeraldpay/dshackle' + tags = dockerTags + } + container { + jvmFlags = [ + '-Xms1024m', + ] + mainClass = 'io.emeraldpay.dshackle.StarterKt' + args = [] + ports = ['8090'] + } +} \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 322059df..e69de29b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +0,0 @@ -upstream.ethereumclassic=http://localhost:8545 -upstream.ethereumclassic.ws=ws://localhost:8546 - -upstream.ethereum=http://localhost:8645 \ No newline at end of file