Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/service/assets/docker-compose.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ services:
environment:
- GF_SERVER_ROOT_URL={{ .RootUrl }}/grafana
- GF_SERVER_SERVE_FROM_SUB_PATH=true
- GF_SMTP_ENABLED=true
- GF_SMTP_FROM_ADDRESS=grafana@{{ .Hostname }}
- GF_SMTP_SKIP_VERIFY=true
- GF_METRICS_ENABLED=false
volumes:
- /var/lib/finch/grafana:/var/lib/grafana
- /var/lib/finch/grafana/alerting:/etc/grafana/provisioning/alerting
entrypoint:
- sh
- -euc
- |
export GF_SMTP_HOST="$(ip route | awk '/default/ {print $3; exit}'):25"
mkdir -p /etc/grafana/provisioning/datasources
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml
apiVersion: 1
Expand Down
2 changes: 2 additions & 0 deletions internal/service/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,15 @@ func (s *Service) __deployCopyComposeFile() error {
}

data := struct {
Hostname string
RootUrl string
AlloyConfigHash string
GrafanaConfigHash string
LokiConfigHash string
MimirConfigHash string
PyroscopeConfigHash string
}{
Hostname: s.config.Hostname,
RootUrl: fmt.Sprintf("https://%s", s.config.Hostname),
AlloyConfigHash: s.__configHash(alloyRendered.Bytes()),
GrafanaConfigHash: s.__configHash(grafanaChunks...),
Expand Down