diff --git a/consumer/consumer-docker-compose.yml b/consumer/consumer-docker-compose.yml index 7b3d64e..4dcf909 100644 --- a/consumer/consumer-docker-compose.yml +++ b/consumer/consumer-docker-compose.yml @@ -1,16 +1,7 @@ version: '3' services: - api: - build: ../api - image: kafka_api - container_name: kafka_api_container - ports: - - "8000:8000" - volumes: - - ../api:/app - networks: - - archimicroprojet_kafka_net + kafka-consumer: build: @@ -24,20 +15,9 @@ services: POSTGRES_DB: coordonnee networks: - archimicroprojet_kafka_net + - front : - build: ../front - image: kafka_front - container_name: kafka_front_container - ports: - - "4200:4200" - volumes : - - ../front:/app - command: ng serve --host 0.0.0.0 - networks: - - archimicroprojet_kafka_net - depends_on: - - api + networks: diff --git a/docker-compose.yml b/docker-compose.yml index 37034f0..f11be7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,16 +27,44 @@ services: ports: - "9092:9092" environment: - KAFKA_LISTENERS: INTERNAL://:9092,EXTERNAL_SAME_HOST://:29092,EXTERNAL_DIFFERENT_HOST://:29093, + KAFKA_LISTENERS: INTERNAL://0.0.0.0:9092,EXTERNAL_SAME_HOST://0.0.0.0:29092,EXTERNAL_DIFFERENT_HOST://0.0.0.0:29093, KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL_SAME_HOST://localhost:29092,EXTERNAL_DIFFERENT_HOST://172.12.0.1:29093 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_SAME_HOST:PLAINTEXT,EXTERNAL_DIFFERENT_HOST:PLAINTEXT KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_CREATE_TOPICS: "coordinates:2:1" + KAFKA_CREATE_TOPICS: "coordinates:10:1" networks: - kafka_net + front : + build: ./front + image: kafka_front + container_name: kafka_front_container + ports: + - "4200:4200" + volumes : + - ./front:/app + command: ng serve --host 0.0.0.0 + networks: + - kafka_net + depends_on: + - api + + api: + build: ./api + image: kafka_api + container_name: kafka_api_container + ports: + - "8000:8000" + volumes: + - ./api:/app + networks: + - kafka_net + restart: on-failure + depends_on: + - postgres + networks: kafka_net: driver: bridge