-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yaml
executable file
·50 lines (46 loc) · 1.9 KB
/
docker-compose.yaml
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
version: '3.0'
services:
backend_builder:
image: golang:1.19
working_dir: /go/src/victoriametrics-datasource
volumes:
- ./:/go/src/victoriametrics-datasource
- ./.cache:/go/pkg/mod
- ./.cache:/go-cache
environment:
CGO_ENABLED: "0"
command: |
bash -xec "
GOOS=linux GOARCH=amd64 go build -o ./victoriametrics-datasource/victoriametrics_datasource_plugin_linux_amd64 ./pkg/ && \
GOOS=linux GOARCH=arm64 go build -o ./victoriametrics-datasource/victoriametrics_datasource_plugin_linux_arm64 ./pkg/ && \
GOOS=linux GOARCH=arm go build -o ./victoriametrics-datasource/victoriametrics_datasource_plugin_linux_arm ./pkg/ && \
GOOS=linux GOARCH=386 go build -o ./victoriametrics-datasource/victoriametrics_datasource_plugin_linux_386 ./pkg/ && \
GOOS=darwin GOARCH=arm64 go build -o ./victoriametrics-datasource/victoriametrics_datasource_plugin_darwin_arm64 ./pkg/ && \
GOOS=darwin GOARCH=amd64 go build -o ./victoriametrics-datasource/victoriametrics_datasource_plugin_darwin_amd64 ./pkg/ && \
chmod +x ./victoriametrics-datasource/victoriametrics_datasource_plugin*
"
frontend_builder:
image: node:18.13.0
working_dir: /victoriametrics-datasource
volumes:
- ./:/victoriametrics-datasource
# for speedup yarn install
- "node_modules:/victoriametrics-datasource/node_modules"
command: |
bash -xec "
if [[ "3" == `ls -la ./node_modules/ | wc -l` ]]; then yarn install --omit=dev; fi && \
yarn run build
"
grafana:
container_name: 'victoriametrics-datasource'
build:
context: ./.config
args:
grafana_version: ${GRAFANA_VERSION:-9.1.2}
ports:
- 3000:3000/tcp
volumes:
- ./victoriametrics-datasource:/var/lib/grafana/plugins/victoriametrics-datasource,
- ./provisioning:/etc/grafana/provisioning
volumes:
node_modules: