FrontendService: Fix backend.dockerfile (#108195)
* FrontendService: Fix backend.dockerfile * comments * Fix backends rebuilding image instead of just restarting when assets change * route /logout to grafana backend * fix script in dockerfile
This commit is contained in:
+2
-1
@@ -69,7 +69,8 @@ COPY go.* ./
|
||||
COPY .bingo .bingo
|
||||
COPY .citools .citools
|
||||
|
||||
# Include vendored dependencies
|
||||
# Copy go dependencies first
|
||||
# If updating this, please also update devenv/frontend-service/backend.dockerfile
|
||||
COPY pkg/util/xorm pkg/util/xorm
|
||||
COPY pkg/apiserver pkg/apiserver
|
||||
COPY pkg/apimachinery pkg/apimachinery
|
||||
|
||||
@@ -62,7 +62,7 @@ docker_build('grafana-backend', '../..',
|
||||
"./public/build/assets-manifest.json",
|
||||
],
|
||||
live_update = [
|
||||
sync('./public/build/assets-manifest.json', '/grafana/public/build/assets-manifest.json'),
|
||||
sync('../../public/build/assets-manifest.json', '/grafana/public/build/assets-manifest.json'),
|
||||
restart_container()
|
||||
]
|
||||
)
|
||||
|
||||
@@ -20,7 +20,8 @@ RUN go env GOPATH
|
||||
COPY Makefile devenv/frontend-service/build-grafana.sh ./
|
||||
|
||||
# Copy go mod files first
|
||||
# $: ls -1 {pkg,scripts,apps}**/go.{mod,sum} | sed 's#\(.*\)/go\.\(mod\|sum\)#COPY \1/go.* \1/#' | sort -u
|
||||
# run this command and replace the output below:
|
||||
# find pkg scripts apps -type f \( -name go.mod -o -name go.sum \) -print | sed -E 's#(.*)/go\.(mod|sum)$#COPY \1/go.* \1/#' | sort -u
|
||||
COPY apps/advisor/go.* apps/advisor/
|
||||
COPY apps/alerting/notifications/go.* apps/alerting/notifications/
|
||||
COPY apps/dashboard/go.* apps/dashboard/
|
||||
@@ -31,7 +32,6 @@ COPY apps/playlist/go.* apps/playlist/
|
||||
COPY apps/secret/go.* apps/secret/
|
||||
COPY pkg/aggregator/go.* pkg/aggregator/
|
||||
COPY pkg/apimachinery/go.* pkg/apimachinery/
|
||||
COPY pkg/apis/secret/go.* pkg/apis/secret/
|
||||
COPY pkg/apiserver/go.* pkg/apiserver/
|
||||
COPY pkg/build/go.* pkg/build/
|
||||
COPY pkg/build/wire/go.* pkg/build/wire/
|
||||
|
||||
@@ -36,7 +36,7 @@ server {
|
||||
# API calls go to the backend
|
||||
# Cheat with app plugin paths and route them to the backend. These should come from
|
||||
# the Plugin CDN
|
||||
location ~ ^/(api|apis|bootdata|public\/plugins\/grafana\-\w+\-app) {
|
||||
location ~ ^/(api|apis|bootdata|logout|public\/plugins\/grafana\-\w+\-app) {
|
||||
proxy_pass http://backend;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user