-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose-swarmstack.yml
49 lines (46 loc) · 1.29 KB
/
docker-compose-swarmstack.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
version: "3.3"
networks:
default:
external:
name: swarmstack_net
volumes:
influxdb-data:
driver: pxd
driver_opts:
repl: 2
size: 40
# https://docs.influxdata.com/influxdb/v1.7/administration/config
services:
influxdb:
image: influxdb:1.7-alpine
environment:
- INFLUXDB_ADMIN_ENABLED=true
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER:-admin}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD:-admin}
- INFLUXDB_DB=prometheus
- INFLUXDB_HTTP_LOG_ENABLED=false
- INFLUXDB_REPORTING_DISABLED=true
- INFLUXDB_USER=${INFLUXDB_USER:-prometheus}
- INFLUXDB_USER_PASSWORD=${INFLUXDB_USER_PASSWORD:-prompass}
deploy:
mode: replicated
replicas: 1
labels:
prometheus.enable: "true"
prometheus.port: "8086"
prometheus.path: "/metrics"
placement:
constraints:
- node.Labels.storagegroup==RED
resources:
limits:
memory: 2048M
reservations:
memory: 1024M
healthcheck:
test: "ln -sf /bin/busybox /bin/wget && /bin/wget -q -Y off http://localhost:8086/metrics -O /dev/null > /dev/null 2>&1"
interval: 25s
timeout: 3s
start_period: 30s
volumes:
- influxdb-data:/var/lib/influxdb