Last active
February 25, 2020 01:16
-
-
Save thinkmicroservices/53ed5e95e4f0fac7168c42e30bd84995 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## docker-compose -f ./dc-01-discovery.yml up -d | |
| version: "3.7" | |
| services: | |
| ################ | |
| # Elastisearch # https://geowarin.com/spring-boot-logs-in-elastic-search-with-fluentd/ | |
| ################ | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0 | |
| # container_name: elasticsearch | |
| environment: | |
| - "discovery.type=single-node" | |
| expose: | |
| - "9200" | |
| ports: | |
| - "9200:9200" | |
| networks: | |
| - spring_ri_network | |
| ########## | |
| # Kibana # http://localhost:5601/app/kibana#/home | |
| ########## | |
| kibana: | |
| image: kibana:7.2.0 | |
| links: | |
| - "elasticsearch" | |
| ports: | |
| - "5601:5601" | |
| depends_on: | |
| - elasticsearch | |
| networks: | |
| - spring_ri_network | |
| ########### | |
| # fluentd # | |
| ########### | |
| fluentd: | |
| #build: ./fluentd | |
| image: thinkmicroservices/fluentd:latest | |
| #volumes: | |
| # - ./fluentd/conf:/fluentd/etc | |
| links: | |
| - "elasticsearch" | |
| ports: | |
| - "24224:24224" | |
| - "24224:24224/udp" | |
| networks: | |
| - spring_ri_network | |
| depends_on: | |
| - elasticsearch | |
| ######################### | |
| # configuration service # | |
| ######################### | |
| config-service: | |
| image: thinkmicroservices/configuration-service:latest | |
| environment: | |
| - spring.main.banner-mode="off" | |
| networks: | |
| - spring_ri_network | |
| ports: | |
| - 8888:8888 | |
| healthcheck: | |
| test: ["CMD", "curl", "--fail", "--silent", "http://think:microservices@localhost:8888/actuator/health"] | |
| interval: 30s | |
| timeout: 30s | |
| retries: 10 | |
| depends_on: | |
| - fluentd | |
| ## - postgresDB | |
| ## - rabbitmq | |
| links: | |
| - fluentd | |
| logging: | |
| driver: "fluentd" | |
| options: | |
| fluentd-address: localhost:24224 | |
| tag: configuration.svc | |
| ##################### | |
| # discovery service # | |
| ##################### | |
| discovery-service: | |
| image: thinkmicroservices/discovery-service:latest | |
| environment: | |
| - spring.main.banner-mode="off" | |
| - spring.cloud.config.uri=http://config-service:8888 | |
| networks: | |
| - spring_ri_network | |
| ports: | |
| - 8761:8761 | |
| links: | |
| - fluentd | |
| healthcheck: | |
| test: ["CMD", "curl", "--fail", "--silent", "http://think:microservices@localhost:8761/actuator/health"] | |
| interval: 30s | |
| timeout: 30s | |
| retries: 10 | |
| depends_on: | |
| - config-started | |
| restart: on-failure | |
| logging: | |
| driver: "fluentd" | |
| options: | |
| fluentd-address: localhost:24224 | |
| tag: discovery.svc | |
| config-started: | |
| image: dadarek/wait-for-dependencies | |
| depends_on: | |
| - config-service | |
| command: http://think:microservices@localhost:8888/actuator/health 2>&1 | grep UP || exit 1 | |
| networks: | |
| spring_ri_network: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment