From b783703faa2b7a130d04c46e86947a44ffb50374 Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Fri, 12 Feb 2021 18:57:04 -0500 Subject: [PATCH] Docker/config updates --- src/api/config/filebeat.yml | 13 ------------- src/api/docker-compose.yaml | 34 +++++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/api/config/filebeat.yml b/src/api/config/filebeat.yml index 7fe77450bf..ec01d51df1 100644 --- a/src/api/config/filebeat.yml +++ b/src/api/config/filebeat.yml @@ -11,22 +11,9 @@ filebeat.autodiscover: processors: - add_docker_metadata: ~ -#filebeat.inputs: -# - type: log -# enabled: true -# paths: -# - '/var/lib/docker/containers/*/*.log' -# json.message_key: log -# json.keys_under_root: true - -#monitoring.enabled: true - output.elasticsearch: hosts: ['http://elasticsearch:9200'] -#output.console: -# pretty: true - setup.kibana: host: 'http://kibana:5601' dashboards.enabled: true diff --git a/src/api/docker-compose.yaml b/src/api/docker-compose.yaml index b0b18d8c63..3819bcbff4 100644 --- a/src/api/docker-compose.yaml +++ b/src/api/docker-compose.yaml @@ -6,6 +6,7 @@ services: container_name: 'traefik' restart: unless-stopped command: + - '--log.level=DEBUG' - '--api.insecure=true' - '--providers.docker=true' - '--providers.docker.exposedbydefault=true' @@ -17,8 +18,6 @@ services: - '8080:8080' volumes: - /var/run/docker.sock:/var/run/docker.sock - labels: - - 'traefik.enable=true' # ELK Stack elasticsearch: @@ -118,22 +117,43 @@ services: environment: - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 - KIBANA_HOST=http://kibana:5601 + ports: + - '8200' + healthcheck: + test: + [ + 'CMD', + 'curl', + '--write-out', + "'HTTP %{http_code}'", + '--silent', + '--output', + '/dev/null', + 'http://apm:8200/healthcheck', + ] + retries: 10 + interval: 10s depends_on: elasticsearch: condition: service_healthy - kibana: - condition: service_healthy # Micro Services - image-service: - container_name: 'image-service' + image: + container_name: 'image' + restart: unless-stopped build: context: ./image dockerfile: Dockerfile environment: + - IMAGE_PORT=4444 + - SERVICE_NAME=image - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 + - ELASTIC_APM_SERVER_URL=http://apm:8200 depends_on: - - traefik + elasticsearch: + condition: service_healthy + traefik: + condition: service_started ports: - '4444' labels: