forked from bitfinexcom/bfx-reports-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.worker
43 lines (33 loc) · 1.24 KB
/
Dockerfile.worker
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
FROM node:18.17.1-bookworm
ARG GRC_VER="0.7.1"
WORKDIR /home/node/grenache-cli
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
jq \
xxd \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN wget -c https://github.com/bitfinexcom/grenache-cli/releases/download/${GRC_VER}/grenache-cli-${GRC_VER}.tar.xz \
&& tar -xf grenache-cli-${GRC_VER}.tar.xz \
&& cd grenache-cli-${GRC_VER} \
&& ./configure \
&& make \
&& make install \
&& grenache-keygen
WORKDIR /home/node/bfx-reports-framework
COPY package*.json .npmrc ./
RUN npm i --production --no-audit
COPY ./config ./config
RUN cp config/schedule.json.example config/schedule.json \
&& cp config/common.json.example config/common.json \
&& cp config/service.report.json.example config/service.report.json \
&& cp config/facs/grc.config.json.example config/facs/grc.config.json \
&& cp config/facs/grc-slack.config.json.example config/facs/grc-slack.config.json
COPY . .
COPY ./scripts/worker-entrypoint.sh /usr/local/bin/
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
CMD grenache-lookup -g ${GRAPE_HOST} -p ${GRAPE_APH} "rest:report:api" \
|| kill 1
ENTRYPOINT ["worker-entrypoint.sh"]
CMD ["worker.js"]