-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (36 loc) · 860 Bytes
/
Dockerfile
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
FROM golang:1.13.2-alpine3.10 AS build
WORKDIR /go/ruthie
COPY config ./config
COPY go.mod .
COPY go.sum .
COPY main.go .
COPY message ./message
COPY reader ./reader
COPY writer ./writer
RUN go build -o /go/bin/ruthie
FROM alpine:3.10
COPY --from=build /go/bin/ruthie /usr/local/bin/ruthie
COPY etc /etc/
RUN \
apk add --no-cache \
tzdata \
&& adduser -DH user
USER user
ENV \
RUTHIE_CLICKHOUSE_ADDR= \
RUTHIE_CLICKHOUSE_ALTADDRS= \
RUTHIE_CLICKHOUSE_PASSWORD= \
RUTHIE_CLICKHOUSE_USERNAME= \
\
RUTHIE_CONSUMER_NAME= \
RUTHIE_REDIS_ADDR= \
\
RUTHIE_BATCH=10000 \
RUTHIE_PENDING_BUFFER_SIZE=1000000 \
RUTHIE_PERIOD=60000000000 \
RUTHIE_PIPE_BUFFER_SIZE=50000 \
RUTHIE_PREFETCH_COUNT=30000 \
RUTHIE_QUEUE_NAME_FAILED=ruthie_failed \
RUTHIE_QUEUE_NAME=ruthie \
RUTHIE_SHARDS_COUNT=10
CMD ["/usr/local/bin/ruthie"]