Skip to content

Commit

Permalink
add Dockerfile to notification service and update docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
anasabbal committed Jan 10, 2023
1 parent 330909f commit 5725a41
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
40 changes: 39 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,53 @@ services:
image: eureka-server:latest
ports:
- "8761:8761"
notification-service:
container_name: notification-service
build: ./notification-service
image: notification-service:latest
depends_on:
- eureka-server
- postgres
port:
- "9090:9090"
driver-service:
container_name: driver-service
build: ./driver-service
image: driver-service:latest
depends_on:
- eureka-server
port:
- "8081:8081"
customer-service:
container_name: customer-service
build: ./
build: ./customer-service
image: customer-service:latest
ports:
- "8080:8080"
depends_on:
- postgres
- eureka-server
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 2181:2181

kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
#networks:
# postgres:
# driver: bridge
Expand Down
18 changes: 18 additions & 0 deletions notification-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM openjdk:17-alpine

# label for the image
LABEL Description="Notification- Service" Version="1.0"

# mount the temp volume
VOLUME /tmp

# Add the service as app.jar
ADD target/notification-service-1.0-SNAPSHOT.jar notification-service-1.0-SNAPSHOT.jar
# port
EXPOSE 9090

# touch the archive for timestamp
#RUN sh -c 'touch /app.jar'

# entrypoint to the image on run
ENTRYPOINT ["java", "-jar", "notification-service-1.0-SNAPSHOT.jar"]

0 comments on commit 5725a41

Please sign in to comment.