Skip to content

Commit

Permalink
statistics service docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
sqshq committed Feb 28, 2016
1 parent d98ed90 commit 1184675
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 9 deletions.
16 changes: 15 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,18 @@ services:
environment:
MONGODB_PASSWORD: dev-password
ports:
- 27001:27017
- 27001:27017

statistics-service:
environment:
MONGODB_PASSWORD: dev-password
STATISTICS_SERVICE_PASSWORD: dev-password
build: statistics-service
ports:
- 8000:8000

statistics-mongodb:
environment:
MONGODB_PASSWORD: dev-password
ports:
- 27002:27017
34 changes: 28 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
restart: always
logging:
options:
max-size: "30m"
max-size: "10m"
max-file: "10"

gateway:
Expand All @@ -15,7 +15,7 @@ services:
- 80:4000
logging:
options:
max-size: "30m"
max-size: "10m"
max-file: "10"

auth-service:
Expand All @@ -28,7 +28,7 @@ services:
MONGODB_PASSWORD:
logging:
options:
max-size: "30m"
max-size: "10m"
max-file: "10"

auth-mongodb:
Expand All @@ -39,7 +39,7 @@ services:
MONGODB_PASSWORD:
logging:
options:
max-size: "30m"
max-size: "10m"
max-file: "10"

account-service:
Expand All @@ -50,7 +50,7 @@ services:
MONGODB_PASSWORD:
logging:
options:
max-size: "30m"
max-size: "10m"
max-file: "10"

account-mongodb:
Expand All @@ -62,5 +62,27 @@ services:
MONGODB_PASSWORD:
logging:
options:
max-size: "30m"
max-size: "10m"
max-file: "10"

statistics-service:
image: sqshq/piggymetrics-statistics-service
restart: always
environment:
STATISTICS_SERVICE_PASSWORD:
MONGODB_PASSWORD:
logging:
options:
max-size: "10m"
max-file: "10"

statistics-mongodb:
build: mongodb
image: sqshq/piggymetrics-statistics-mongodb
restart: always
environment:
MONGODB_PASSWORD:
logging:
options:
max-size: "10m"
max-file: "10"
5 changes: 5 additions & 0 deletions statistics-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM java:8-jre
ADD ./target/statistics-service.jar /app/
CMD ["java", "-jar", "/app/statistics-service.jar"]

EXPOSE 7000
3 changes: 3 additions & 0 deletions statistics-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>statistics-service</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down
12 changes: 10 additions & 2 deletions statistics-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000

security:
oauth2:
client:
Expand All @@ -12,8 +20,8 @@ security:
spring:
data:
mongodb:
host: account-mongodb
username: service
host: statistics-mongodb
username: user
password: ${MONGODB_PASSWORD}
database: piggymetrics

Expand Down

0 comments on commit 1184675

Please sign in to comment.