forked from sourcegraph/deploy-sourcegraph-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-grafana.sh
executable file
·30 lines (28 loc) · 1.04 KB
/
deploy-grafana.sh
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
#!/usr/bin/env bash
set -e
# Description: Dashboards and graphs for Prometheus metrics.
#
# Disk: 2GB / persistent SSD
# Network: 100mbps
# Liveness probe: n/a
# Ports exposed to other Sourcegraph services: none
# Ports exposed to the public internet: none (HTTP 3000 should be exposed to admins only)
#
VOLUME="$HOME/sourcegraph-docker/grafana-disk"
./ensure-volume.sh $VOLUME 472
docker run --detach \
--name=grafana \
--network=sourcegraph \
--restart=always \
--cpus=1 \
--memory=1g \
-p 0.0.0.0:3370:3370 \
-v $VOLUME:/var/lib/grafana \
-v $(pwd)/grafana/datasources:/sg_config_grafana/provisioning/datasources \
-v $(pwd)/grafana/dashboards:/sg_grafana_additional_dashboards \
index.docker.io/sourcegraph/grafana:3.15.1@sha256:5af40ae6b3a2c4187ad5d57c462684026823231f8efda46fbaa607940d2886ff
# Add the following lines above if you wish to use an auth proxy with Grafana:
#
# -e GF_AUTH_PROXY_ENABLED=true \
# -e GF_AUTH_PROXY_HEADER_NAME='X-Forwarded-User' \
# -e GF_SERVER_ROOT_URL='https://grafana.example.com' \