This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
68 lines (63 loc) · 2.26 KB
/
docker-compose.yaml
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
version: "3.7"
services:
influx:
image: influxdb:2.1-alpine
env_file:
- .env
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: ${TELEMETRY_INFLUXDB_USERNAME:-telemetry}
DOCKER_INFLUXDB_INIT_PASSWORD: ${TELEMETRY_INFLUXDB_PASSWORD:-telemetry}
DOCKER_INFLUXDB_INIT_ORG: ${TELEMETRY_INFLUXDB_ORG:-suse}
DOCKER_INFLUXDB_INIT_BUCKET: ${TELEMETRY_INFLUXDB_BUCKET:-telemetry}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${TELEMETRY_INFLUXDB_TOKEN:-telemetry-token}
volumes:
- influx_data:/var/lib/influxdb2:rw
- ./docker/influx/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:rw
ports:
- target: 8086
published: 8086
protocol: tcp
database:
image: postgres:14-alpine
env_file:
- .env
environment:
POSTGRES_DB: ${TELEMETRY_DB_NAME:-telemetry}
POSTGRES_PASSWORD: ${TELEMETRY_DB_PASSWORD:-password}
POSTGRES_USER: ${TELEMETRY_DB_USER:-telemetry}
volumes:
- db_data:/var/lib/postgresql/data:rw
- ./docker/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw.
ports:
- target: 5432
published: 5432
protocol: tcp
grafana:
build:
context: .
dockerfile: Dockerfile.Grafana
env_file:
- .env
environment:
TELEMETRY_INFLUXDB_URL: ${TELEMETRY_INFLUXDB_URL:-http://influx:8086}
TELEMETRY_INFLUXDB_ORG: ${TELEMETRY_INFLUXDB_ORG:-suse}
TELEMETRY_INFLUXDB_TOKEN: ${TELEMETRY_INFLUXDB_TOKEN:-telemetry-token}
TELEMETRY_INFLUXDB_BUCKET: ${TELEMETRY_INFLUXDB_BUCKET:-telemetry}
TELEMETRY_POSTGRES_HOST: ${TELEMETRY_DB_HOST:-database}
TELEMETRY_POSTGRES_PORT: ${TELEMETRY_DB_PORT:-5432}
TELEMETRY_POSTGRES_DB: ${TELEMETRY_DB_NAME:-telemetry}
TELEMETRY_POSTGRES_PASSWORD: ${TELEMETRY_DB_PASSWORD:-password}
TELEMETRY_POSTGRES_USER: ${TELEMETRY_DB_USER:-telemetry}
ports:
- target: 3000
published: 3000
protocol: tcp
volumes:
- grafana_data:/var/lib/grafana:rw
volumes:
influx_data:
db_data:
grafana_data: