Skip to content

Commit

Permalink
Use minimal heap base image for services
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Jun 3, 2020
1 parent 85bb9fa commit 38f5caa
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 48 deletions.
8 changes: 0 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ services:
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_DATABASE_SCHEMA: ftgo_consumer_service
JAVA_OPTS: -Xmx192m
ftgo-order-service:
build: ./ftgo-order-service
ports:
Expand All @@ -115,7 +114,6 @@ services:
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
Expand All @@ -136,7 +134,6 @@ services:
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
EVENTUATE_DATABASE_SCHEMA: ftgo_kitchen_service
ftgo-restaurant-service:
build: ./ftgo-restaurant-service
Expand All @@ -154,7 +151,6 @@ services:
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
EVENTUATE_DATABASE_SCHEMA: ftgo_restaurant_service
ftgo-accounting-service:
build: ./ftgo-accounting-service
Expand All @@ -172,7 +168,6 @@ services:
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
EVENTUATE_DATABASE_SCHEMA: ftgo_accounting_service
ftgo-delivery-service:
build: ./ftgo-delivery-service
Expand All @@ -190,7 +185,6 @@ services:
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
Expand All @@ -212,7 +206,6 @@ services:
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-access_key}
AWS_DYNAMODB_ENDPOINT_URL: http://dynamodblocal:8000
AWS_REGION: ${AWS_REGION:-us-west-2}
JAVA_OPTS: -Xmx192m
ftgo-api-gateway:
build: ./ftgo-api-gateway
ports:
Expand All @@ -221,7 +214,6 @@ services:
ORDER_DESTINATIONS_ORDERSERVICEURL: http://ftgo-order-service:8080
ORDER_DESTINATIONS_ORDERHISTORYSERVICEURL: http://ftgo-order-history-service:8080
CONSUMER_DESTINATIONS_CONSUMERSERVICEURL: http://ftgo-consumer-service:8080
JAVA_OPTS: -Xmx192m
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
Expand Down
7 changes: 2 additions & 5 deletions ftgo-accounting-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-accounting-service.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-accounting-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-accounting-service.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-api-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-api-gateway.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-api-gateway.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-api-gateway.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-consumer-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-consumer-service.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-consumer-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-consumer-service.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-delivery-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
CMD java ${JAVA_OPTS} -jar ftgo-delivery-service.jar
COPY build/libs/ftgo-delivery-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-delivery-service.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-kitchen-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-kitchen-service.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-kitchen-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-kitchen-service.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-order-history-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-order-history-service.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-order-history-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-order-history-service.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-order-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-order-service.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-order-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-order-service.jar service.jar
7 changes: 2 additions & 5 deletions ftgo-restaurant-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FROM openjdk:8u171-jre-alpine
RUN apk --no-cache add curl
CMD java ${JAVA_OPTS} -jar ftgo-restaurant-service.jar
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/actuator/health || exit 1
COPY build/libs/ftgo-restaurant-service.jar .
FROM eventuateio/eventuate-examples-docker-images-java-example-base-image:BUILD-5
COPY build/libs/ftgo-restaurant-service.jar service.jar

0 comments on commit 38f5caa

Please sign in to comment.