diff --git a/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/DockerStackConfiguration.kt b/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/DockerStackConfiguration.kt index 55f353bccf..26434712f3 100644 --- a/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/DockerStackConfiguration.kt +++ b/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/DockerStackConfiguration.kt @@ -8,7 +8,8 @@ import org.springframework.boot.gradle.tasks.bundling.BootBuildImage fun Project.createStackDeployTask() { tasks.register("startLocalDockerRegistry") { - description = "Start local docker registry for spring boot images" + enabled = false + description = "Start local docker registry for spring boot images. Disabled, see comment in deployDockerStack task." commandLine("docker", "service", "create", "--name", "registry", "--publish", "published=6000,target=5000", "registry:2") } @@ -21,15 +22,13 @@ fun Project.createStackDeployTask() { into("${System.getProperty("user.home")}/configs") } } - description = "Deploy docker stack to docker swarm" + description = "Deploy to docker swarm. If swarm contains more than one node, some registry for built images is requried." commandLine("docker", "stack", "deploy", "--compose-file", "docker-compose.yaml", "save") - // or just run services locally - // commandLine("docker-compose", "up", "-d") - doLast { - exec { - description = "Stop local docker registry" - commandLine("docker", "service", "rm", "registry") - } - } +// doLast { +// exec { +// description = "Stop local docker registry" +// commandLine("docker", "service", "rm", "registry") +// } +// } } } diff --git a/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/SpringBootConfiguration.kt b/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/SpringBootConfiguration.kt index be30d1758d..0e32eedc71 100644 --- a/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/SpringBootConfiguration.kt +++ b/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/SpringBootConfiguration.kt @@ -27,9 +27,8 @@ fun Project.configureSpringBoot() { tasks.named("bootBuildImage") { dependsOn(rootProject.tasks.getByName("startLocalDockerRegistry")) // `host.docker.internal` for win 10? - imageName = "localhost:6000/${project.name}:${project.version}" + imageName = "127.0.0.1:6000/${project.name}:${project.version}" environment = mapOf("BP_JVM_VERSION" to Versions.BP_JVM_VERSION) - // setting `isPublish` with temporary local registry seems tricky doLast { exec { commandLine("docker", "push", imageName)