-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.remote
32 lines (24 loc) · 1.27 KB
/
Dockerfile.remote
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
ARG grafana_image=grafana-enterprise
ARG grafana_version=latest
FROM grafana/${grafana_image}:${grafana_version}
ARG backendUrl
ARG basicAuthUser
ARG basicAuthPassword
# Make it as simple as possible to access the grafana instance for development purposes
# Do NOT enable these settings in a public facing / production grafana instance
ENV GF_AUTH_ANONYMOUS_ORG_ROLE="Admin"
ENV GF_AUTH_ANONYMOUS_ENABLED="true"
ENV GF_AUTH_BASIC_ENABLED="false"
# Set development mode so plugins can be loaded without the need to sign
ENV GF_DEFAULT_APP_MODE="development"
# Credentials for fecthing remote profile data
ENV REMOTE_BACKEND_URL=$backendUrl
ENV REMOTE_BASIC_AUTH_USER=$basicAuthUser
ENV REMOTE_BASIC_AUTH_PASSWORD=$basicAuthPassword
USER root
# This ensures that the basicAuthUser value is a string and not a number
# which would make the requests to the backend fail
COPY ./samples/provisioning-remote/plugins/app.yaml /etc/grafana/provisioning/plugins
RUN sed -i "s/\$REMOTE_BASIC_AUTH_USER/'$REMOTE_BASIC_AUTH_USER'/g" /etc/grafana/provisioning/plugins/app.yaml
COPY ./samples/provisioning-remote/datasources/datasources.yaml /etc/grafana/provisioning/datasources
RUN sed -i "s/\$REMOTE_BASIC_AUTH_USER/'$REMOTE_BASIC_AUTH_USER'/g" /etc/grafana/provisioning/datasources/datasources.yaml