Refactor docker compose so default launches everything

This commit is contained in:
Dave Syer
2015-12-15 09:44:11 +00:00
parent 327bb46e90
commit 28dbb0cd14
16 changed files with 250 additions and 61 deletions

View File

@@ -1,6 +0,0 @@
FROM frolvlad/alpine-oraclejdk8
VOLUME /tmp
ADD @project.artifactId@-@project.version@-exec.jar app.jar
RUN sh -c 'touch /app.jar'
EXPOSE 9411
CMD ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

View File

@@ -1,15 +0,0 @@
package org.springframework.cloud.sleuth.zipkin.stream;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@SpringBootApplication
@EnableZipkinStreamServer
public class ZipkinStreamServerApplication {
public static void main(String[] args) throws Exception {
new SpringApplicationBuilder(ZipkinStreamServerApplication.class)
.properties("spring.config.name=zipkin-server").run(args);
}
}

View File

@@ -1,26 +0,0 @@
server:
port: 9411
spring:
rabbitmq:
host: ${RABBIT_HOST:localhost}
datasource:
schema: classpath:/mysql.sql
url: jdbc:mysql://${MYSQL_HOST:localhost}/test
username: root
password: root
# Switch this on to create the schema on startup:
initialize: true
continueOnError: true
sleuth:
enabled: false
zipkin:
store:
type: mysql # default is inMemory
---
spring:
profiles: test
zipkin:
store:
type: mem # default is inMemory

View File

@@ -5,8 +5,11 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.cloud.sleuth.zipkin.stream.ZipkinServerApplicationTests.ZipkinStreamServerApplication;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -27,4 +30,15 @@ public class ZipkinServerApplicationTests {
assertEquals(0, count);
}
@SpringBootApplication
@EnableZipkinStreamServer
public static class ZipkinStreamServerApplication {
public static void main(String[] args) throws Exception {
new SpringApplicationBuilder(ZipkinStreamServerApplication.class)
.profiles("test").properties("spring.datasource.initialize=true")
.run(args);
}
}
}