aboutsummaryrefslogtreecommitdiffstats
path: root/elk/docker-compose.yaml
blob: cf913bac4771866c9e7e45e3d3ebb81571c85633 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: "3.4"
services:
  # notification:
  #   image: notification
  #   build:
  #     context: ./
  #   networks:
  #     - notifnet
  #   restart: on-failure
  #   ports:
  #     - "8383:8383"
  #   depends_on:
  #     - elasticsearch
  #     - mongopercona
  #   volumes:
  #     - log-data:/logs/
  #   secrets:
  #     - sms_api_key
  #     - sms_secret_key
  #     - firebase_api_key
  #     - firebase_admin_sdk_pk
  #     - firebase_google_services
  #   environment:
  #     - FIREBASE_CONFIG="/run/secrets/firebase_google_services.json"
  #     - GOOGLE_APPLICATION_CREDENTIALS="/run/secrets/firebase_admin_sdk_pk"
  mongopercona:
    image: percona/percona-server-mongodb:4.0
    networks:
      - notifnet
    restart: on-failure
    volumes:
      - queue-data:/data/db
      - ./percona/mongod.conf:/etc/mongod.conf:ro
    ports:
      - "27017:27017"
      - "27018:27018"
      - "27019:27019"
  mongo:
    image: mongo
    networks:
      - notifnet
    restart: on-failure
    ports:
      - "27117:27017"
      - "27118:27018"
      - "27119:27019"
    volumes:
      - user-data:/data/db
  elasticsearch:
    image: elasticsearch:7.10.1
    volumes:
      - elk-data:/usr/share/elasticsearch/data
    networks:
      - notifnet
      - lognet
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - ES_JAVA_OPTS=-Xms256m -Xmx256m
      - discovery.type=single-node
      - xpack.monitoring.enabled=true
      - xpack.watcher.enabled=true
  logstash:
    image: logstash:7.10.1
    networks:
      - lognet
    depends_on:
      - elasticsearch
    environment:
      - MONITORING_ENABLED=true
      - LS_JAVA_OPTS=-Xms256m -Xmx256m
    ports:
      - "5000:5000"
  kibana:
    image: kibana:7.10.1
    environment:
      - ELASTICSEARCH_URL=http://elastic:9200
    networks:
      - lognet
    ports:
      - "5102:5601"
    depends_on:
      - elasticsearch
  filebeat:
    image: docker.elastic.co/beats/filebeat:7.10.1
    networks:
      - lognet
    depends_on:
      - elasticsearch
    environment:
      - setup.kibana.host=kibana:5601
      - output.elasticsearch.hosts=["elasticsearch:9200"]
    volumes:
      - log-data:/logs/
      - ./filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml
volumes:
  queue-data:
  elk-data:
  log-data:
  user-data:
networks:
  lognet:
    # driver: bridge
    driver: overlay
    attachable: true
  notifnet:
    # driver: bridge
    driver: overlay
    attachable: true
secrets:
  sms_api_key:
    file: ./sms_api_key.txt
  sms_secret_key:
    file: ./sms_secret_key.txt
  firebase_api_key:
    file: ./firebase_api_key.txt
  firebase_admin_sdk_pk:
    file: ./es-provider-firebase-adminsdk-36qrt-609d77a41b.json
  firebase_google_services:
    file: ./google-services.json