File size: 1,501 Bytes
b47934a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
include:
  - ../../quickstart/docker-compose.yaml

services:
  collector:
    image: ghcr.io/openmeterio/benthos-collector:latest
    ports:
      - "127.0.0.1:4195:4195"
    environment:
      OPENMETER_URL: http://openmeter:8888
      BATCH_SIZE: 1
    command: [
      "--config",
      "/etc/collector/config.yaml",
      "--log.level",
      "debug",
      "--resources",
      "/etc/collector/resources/*.yaml",
      "streams",
      "--no-api",
      "/etc/collector/streams/*.yaml",
    ]
    healthcheck:
      test: [ "CMD", "wget", "--spider", "http://collector:4195/ready" ]
      interval: 10s
      timeout: 5s
      retries: 30
    volumes:
      - type: volume
        source: collector_data
        target: /var/lib/collector
      - type: bind
        source: ./collector
        target: /etc/collector
    depends_on:
      openmeter:
        condition: service_healthy

  seeder:
    image: ghcr.io/openmeterio/benthos-collector:latest
    environment:
      OPENMETER_URL: http://collector:8889
      SEEDER_LOG: true
      SEEDER_COUNT: 100
    command: [
      "--config",
      "/etc/seeder/config.yaml",
    ]
    ports:
      - "127.0.0.1:4196:4196"
    healthcheck:
      test: [ "CMD", "wget", "--spider", "http://seeder:4196/ready" ]
      interval: 10s
      timeout: 5s
      retries: 30
    volumes:
      - type: bind
        source: ./seeder
        target: /etc/seeder
    depends_on:
      collector:
        condition: service_healthy

volumes:
  collector_data: