-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (36 loc) · 2.86 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (36 loc) · 2.86 KB
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
FROM grafana/grafana:10.2.2
###### Customization ########################################
USER root
# Replace Favicon
COPY artefacts/img/basicrum_logo_fav32.png /usr/share/grafana/public/img/fav32.png
# Replace Logo
COPY artefacts/img/basicrum_logo.svg /usr/share/grafana/public/img/grafana_icon.svg
# Update Title
RUN sed -i 's|<title>\[\[.AppTitle\]\]</title>|<title>Basic RUM</title>|g' /usr/share/grafana/public/views/index.html
# Update Javascript
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|"AppTitle","Grafana"|"AppTitle","Basic RUM"|g' {} \;
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|"Welcome to Grafana"|"Welcome to Basic RUM"|g' {} \;
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|"https://grafana.com/docs/grafana/latest"|"https://www.basicrum.com"|g' {} \;
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|,{value:1,label:"Tutorials",href:"https://grafana.com/tutorials"},{value:2,label:"Community",href:"https://community.grafana.com"},{value:3,label:"Public Slack",href:"http://slack.grafana.com"}||g' {} \;
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|utm_source=grafana_gettingstarted|utm_source=basicrum_gettingstarted|g' {} \;
## Remove Documentation, Support, Community in the Footer
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|\[{target:"_blank",id:"documentation".*grafana_footer"}\]|\[\]|g' {} \;
## Remove Edition in the Footer
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|({target:"_blank",id:"license",.*licenseUrl})|()|g' {} \;
## Remove Version in the Footer
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|({target:"_blank",id:"version",.*CHANGELOG.md":void 0})|()|g' {} \;
## Remove New Version is available in the Footer
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|({target:"_blank",id:"updateVersion",text:"New version available!",icon:"download-alt",url:"https://grafana.com/grafana/download?utm_source=grafana_footer"})|()|g' {} \;
## Remove News icon
RUN find /usr/share/grafana/public/build/ -name *.js -exec sed -i 's|..createElement(....,{className:.,onClick:.,iconOnly:!0,icon:"rss","aria-label":"News"})|null|g' {} \;
#############################################################
RUN /bin/bash -c 'grafana cli plugins install ae3e-plotly-panel 0.5.0'
RUN /bin/bash -c 'grafana cli plugins install vertamedia-clickhouse-datasource 2.5.1'
## Set Home Dashboard
ENV GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/General.json
# Adding datasources
ADD templates/datasources/default.yaml /etc/grafana/provisioning/datasources/default.yaml
# Adding dashboards yaml
ADD templates/dashboards/General.yaml /etc/grafana/provisioning/dashboards/General.yaml
# Adding dashboards
ADD build/dashboards /etc/grafana/provisioning/dashboards