-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
55 lines (49 loc) · 1.92 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
version: '3'
services:
surge_scraper:
build: .
depends_on:
- influxdb
- grafana
container_name: Surge_scraper
influxdb:
image: influxdb:2.7.4-alpine
container_name: Influxdb_v2
##user: "1000:1000" # If the data path is on an NFS volume, then you MUST 'chmod 777' for the directory. UID 1000 is 'influxdb' of container user. influxdb runs on 'root' user by default.
volumes:
- influxdb_data:/var/lib/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=root # Change to your preferred value.
- DOCKER_INFLUXDB_INIT_PASSWORD=00000000 # Change to your preferred value. 8 digs at least.
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=00000000 # could be the same as password. API token to associate with the admin user. If not set, InfluxDB automatically generates a token
- DOCKER_INFLUXDB_INIT_ORG=homelab # Change to your preferred value.
- DOCKER_INFLUXDB_INIT_BUCKET=surge # Change to your preferred value.
- DOCKER_INFLUXDB_INIT_RETENTION=1y # 1y is the data that will be retent one year. Duration for the initial bucket’s retention period. If not set, the initial bucket will retain data forever.
ports:
- "8086:8086"
restart: unless-stopped
grafana-oss:
image: grafana/grafana-oss:latest
container_name: Grafana-oss
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin # Change to your preferred value
- GF_SECURITY_ADMIN_PASSWORD=admin # Change to your preferred value
ports:
- "3000:3000"
restart: unless-stopped
volumes:
influxdb_data:
driver: local
driver_opts:
type: none
device: /path/to/your/influxdb_data
o: bind
grafana_data:
driver: local
driver_opts:
type: none
device: /path/to/your/grafana_data
o: bind