-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (99 loc) · 2.4 KB
/
docker-compose.yml
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
version: "3.9"
services:
jetstream:
container_name: nats-cluster
image: nats:latest
entrypoint: /nats-server
ports:
- "4222:4222"
command: --name nats --cluster_name NATS --js --sd /data -p 4222
etcd:
image: gcr.io/etcd-development/etcd:v3.2.10
restart: always
ports:
- "2379:2379"
- "2380:2380"
volumes:
- ./certs/:/srv/
environment:
ETCD_NAME: etcd-node
ETCDCTL_API: 3
ETCD_DEBUG: 1
ETCD_INITIAL_ADVERTISE_PEER_URLS: https://etcd:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: etcd-ftw
ETCD_LISTEN_CLIENT_URLS: https://0.0.0.0:2379
ETCD_LISTEN_PEER_URLS: https://0.0.0.0:2380
ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379
ETCD_CERT_FILE: /srv/ca.pem
ETCD_KEY_FILE: /srv/ca-key.pem
ETCD_PEER_TRUSTED_CA_FILE: /srv/ca.pem
ETCD_PEER_CERT_FILE: /srv/etcd.pem
ETCD_PEER_KEY_FILE: /srv/etcd-key.pem
ETCD_PEER_CLIENT_CERT_AUTH: 1
prometheus:
image: prom/prometheus:v2.19.0
ports:
- "9090:9090"
networks:
- jester
volumes:
- prometheus_data:/prometheus
- prometheus_config:/fragments
- "./config.prometheus.yaml:/etc/prometheus/targets/prometheus.yml"
command:
- '--config.file=/fragments/complete/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
agent:
container_name: "agent-container"
build:
context: .
dockerfile: Dockerfile
command: agent
volumes:
- "./config/config.example.yaml:/app/config.yml"
ports:
- "8080:8080"
depends_on:
- jetstream
- etcd
- prometheus
networks:
- jester
consumer:
container_name: "consumer-container"
build:
context: .
dockerfile: Dockerfile
command: consumer
volumes:
- "./config/config.example.yaml:/app/config.yml"
depends_on:
- agent
networks:
- jester
publisher:
container_name: "consumer-container"
build:
context: .
dockerfile: Dockerfile
command: publisher
volumes:
- "./config/config.example.yaml:/app/config.yml"
depends_on:
- agent
networks:
- jester
volumes:
prometheus_data: {}
prometheus_config:
driver_opts:
type: tmpfs
device: tmpfs
networks:
jester:
driver: bridge
ipam:
config:
- subnet: 172.30.255.0/24
driver: default