-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dashboard
More file actions
42 lines (40 loc) · 1.89 KB
/
Copy pathDockerfile.dashboard
File metadata and controls
42 lines (40 loc) · 1.89 KB
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
# -----------------------------------------------------------------------------
# simplepool dashboard — read-only Express web UI (Node.js)
# -----------------------------------------------------------------------------
# `better-sqlite3` builds a native binding on `npm ci`; a slim build stage
# pulls in python3/make/g++ for that, and the runtime stage carries only the
# already-built node_modules plus the app source.
# -----------------------------------------------------------------------------
FROM node:20-bookworm-slim AS deps
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 make g++ ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY dashboard/package.json dashboard/package-lock.json ./
RUN npm ci --omit=dev
# -----------------------------------------------------------------------------
FROM node:20-bookworm-slim
# grpcurl is used by the "Deposit BTC → Thunder" admin action — one
# static Go binary, uses gRPC reflection so no .proto files needed.
# Fetched from GitHub releases (Debian's apt version lags).
ARG TARGETARCH
ARG GRPCURL_VERSION=1.9.1
RUN apt-get update && apt-get install -y --no-install-recommends \
tini ca-certificates curl \
&& rm -rf /var/lib/apt/lists/* \
&& case "$TARGETARCH" in \
amd64) GRPCURL_ARCH=x86_64 ;; \
arm64) GRPCURL_ARCH=arm64 ;; \
*) echo "unsupported arch: $TARGETARCH"; exit 1 ;; \
esac \
&& curl -fsSL -o /tmp/grpcurl.tgz \
"https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_linux_${GRPCURL_ARCH}.tar.gz" \
&& tar -xzf /tmp/grpcurl.tgz -C /usr/local/bin grpcurl \
&& chmod +x /usr/local/bin/grpcurl \
&& rm /tmp/grpcurl.tgz
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY dashboard/ ./
USER node
EXPOSE 8081
ENTRYPOINT ["/usr/bin/tini", "--", "node", "server.js"]