add: other modules
This commit is contained in:
parent
0f79fafa23
commit
5e2ff73e24
20
Dockerfile
20
Dockerfile
|
@ -1,5 +1,5 @@
|
|||
FROM golang:alpine AS builder
|
||||
RUN apk add --no-cache git
|
||||
FROM golang AS builder
|
||||
# RUN apk add --no-cache git gcc
|
||||
WORKDIR /app
|
||||
|
||||
# comment this if using vendor
|
||||
|
@ -9,9 +9,18 @@ WORKDIR /app
|
|||
|
||||
COPY . .
|
||||
ENV GOPROXY=https://mod.gokit.info
|
||||
RUN go build -mod vendor -o ./bin/monapi src/modules/monapi/monapi.go \
|
||||
&& go build -mod vendor -o ./bin/index src/modules/index/index.go \
|
||||
&& go build -mod vendor -o ./bin/transfer src/modules/transfer/transfer.go
|
||||
RUN echo "build monapi" \
|
||||
&& go build -v -o ./bin/monapi src/modules/monapi/monapi.go \
|
||||
&& echo "build transfer" \
|
||||
&& go build -v -o ./bin/transfer src/modules/transfer/transfer.go \
|
||||
&& echo "build tsdb" \
|
||||
&& go build -v -o ./bin/tsdb src/modules/tsdb/tsdb.go \
|
||||
&& echo "build index" \
|
||||
&& go build -v -o ./bin/index src/modules/index/index.go \
|
||||
&& echo "build judge" \
|
||||
&& go build -v -o ./bin/judge src/modules/judge/judge.go \
|
||||
&& echo "build collector" \
|
||||
&& go build -v -o ./bin/collector src/modules/collector/collector.go
|
||||
|
||||
FROM alpine:3.10
|
||||
LABEL maintainer="llitfkitfk@gmail.com"
|
||||
|
@ -22,5 +31,6 @@ WORKDIR /app
|
|||
COPY --from=builder /app/etc /app/etc
|
||||
COPY --from=builder /app/bin /usr/local/bin
|
||||
|
||||
|
||||
# ENTRYPOINT []
|
||||
# CMD []
|
|
@ -23,6 +23,26 @@ services:
|
|||
ports:
|
||||
- 5800:5800
|
||||
|
||||
transfer:
|
||||
image: api
|
||||
restart: always
|
||||
command: transfer
|
||||
volumes:
|
||||
- ./docker/etc:/app/etc
|
||||
ports:
|
||||
- 5810:5810
|
||||
- 5811:5811
|
||||
|
||||
tsdb:
|
||||
image: api
|
||||
restart: always
|
||||
command: tsdb
|
||||
volumes:
|
||||
- ./docker/etc:/app/etc
|
||||
ports:
|
||||
- 5820:5820
|
||||
- 5821:5821
|
||||
|
||||
index:
|
||||
image: api
|
||||
restart: always
|
||||
|
@ -33,15 +53,24 @@ services:
|
|||
- 5830:5830
|
||||
- 5831:5831
|
||||
|
||||
transfer:
|
||||
judge:
|
||||
image: api
|
||||
restart: always
|
||||
command: transfer
|
||||
command: judge
|
||||
volumes:
|
||||
- ./docker/etc:/app/etc
|
||||
ports:
|
||||
- 5810:5810
|
||||
- 5811:5811
|
||||
- 5840:5840
|
||||
- 5841:5841
|
||||
|
||||
collector:
|
||||
image: api
|
||||
restart: always
|
||||
command: collector
|
||||
volumes:
|
||||
- ./docker/etc:/app/etc
|
||||
ports:
|
||||
- 2058:2058
|
||||
|
||||
# web:
|
||||
# build:
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
logger:
|
||||
dir: logs/collector
|
||||
level: WARNING
|
||||
keepHours: 2
|
||||
identity:
|
||||
specify: ""
|
||||
shell: /sbin/ifconfig `/sbin/route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1
|
||||
sys:
|
||||
# timeout in ms
|
||||
# interval in second
|
||||
timeout: 1000
|
||||
interval: 20
|
||||
ifacePrefix:
|
||||
- eth
|
||||
- em
|
||||
mountPoint: []
|
||||
mountIgnorePrefix:
|
||||
- /var/lib
|
||||
|
||||
ignoreMetrics:
|
||||
- cpu.core.idle
|
||||
- cpu.core.util
|
||||
- cpu.core.sys
|
||||
- cpu.core.user
|
||||
- cpu.core.nice
|
||||
- cpu.core.guest
|
||||
- cpu.core.irq
|
||||
- cpu.core.softirq
|
||||
- cpu.core.iowait
|
||||
- cpu.core.steal
|
Loading…
Reference in New Issue