diff --git a/builder/Dockerfile b/builder/Dockerfile index 944f55a..b1426a8 100644 --- a/builder/Dockerfile +++ b/builder/Dockerfile @@ -28,3 +28,6 @@ RUN nvm use 20 RUN apt-get install -y golang-go RUN go install github.com/magefile/mage@latest RUN cp /root/go/bin/mage /usr/local/bin/mage + +ENV GO111MODULE=on +ENV GOPROXY=https://proxy.golang.org \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 30e784f..2ff56e3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,11 +4,11 @@ services: context: ./builder dockerfile: Dockerfile volumes: - - .:/app + - ./:/app - go-cache:/root/.cache/go-build - - go-mod-cache:/go/pkg/mod + - go-mod-cache:/root/go/pkg/mod working_dir: /app - command: bash -c "cd /app && GOFLAGS=-buildvcs=false mage -v && npm install && npm run build" + command: bash -c "cd /app && npm ci && GOFLAGS=-buildvcs=false mage -v build:Backend && npm run build" grafana: user: root