update: index config & transfer

This commit is contained in:
llitfkitfk 2020-03-23 01:05:17 +08:00
parent 087333808e
commit 553dcbd9fa
5 changed files with 46 additions and 6 deletions

View File

@ -9,11 +9,13 @@ WORKDIR /app
COPY . .
ENV GOPROXY=https://mod.gokit.info
RUN go build -o ./bin/monapi src/modules/monapi/monapi.go
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
FROM alpine:3.10
LABEL maintainer="llitfkitfk@gmail.com"
RUN apk add --no-cache tzdata ca-certificates
RUN apk add --no-cache tzdata ca-certificates bash
WORKDIR /app

View File

@ -22,7 +22,27 @@ services:
- ./docker/etc:/app/etc
ports:
- 5800:5800
index:
image: api
restart: always
command: index
volumes:
- ./docker/etc:/app/etc
ports:
- 5830:5830
- 5831:5831
transfer:
image: api
restart: always
command: transfer
volumes:
- ./docker/etc:/app/etc
ports:
- 5810:5810
- 5811:5811
# web:
# build:
# context: web

7
docker/etc/index.yml Normal file
View File

@ -0,0 +1,7 @@
logger:
dir: logs/index
level: WARNING
keepHours: 2
identity:
specify: ""
shell: /sbin/ifconfig `/sbin/route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1

11
docker/etc/transfer.yml Normal file
View File

@ -0,0 +1,11 @@
backend:
# in ms
# connTimeout: 1000
# callTimeout: 3000
cluster:
tsdb01: 127.0.0.1:5821
logger:
dir: logs/transfer
level: WARNING
keepHours: 2

View File

@ -52,12 +52,12 @@ http {
}
upstream n9e.index {
server 127.0.0.1:5830;
server index:5830;
keepalive 10;
}
upstream n9e.transfer {
server 127.0.0.1:5810;
server transfer:5810;
keepalive 10;
}
@ -67,7 +67,7 @@ http {
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
include /etc/nginx/conf.d/*.conf;
location / {
root /home/n9e/pub;