-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (27 loc) · 963 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
FROM golang:alpine
WORKDIR ${GOROOT}/bda
ADD go.mod .
ADD go.sum .
RUN go mod download && go mod verify
ADD api ./api
ADD connection ./connection
ADD crawler ./crawler
ADD crawler_collector ./crawler_collector
ADD logger ./logger
ADD models ./models
ADD pinger ./pinger
ADD pinger_collector ./pinger_collector
ADD types ./types
ADD utils ./utils
ADD *.go ./
RUN go build -v -o ./nodes
RUN mv ./nodes /bin
WORKDIR /
# setup cron 2 hour job tasks
ADD ./crawler_collector/crawler_cron.sh /
RUN chmod +x /crawler_cron.sh
#RUN echo "0 */2 * * * run-parts /etc/periodic/2hours" >> /etc/crontabs/root
RUN echo "* */4 * * * /crawler_cron.sh > /dev/stdout" >> /etc/crontabs/root
RUN crontab -l
# set number of file descriptors over 16k - 16k max stable connections
RUN ulimit -n 16384