- Coin: Zano → Lethean, ticker: ZAN/ZANO → LTHN - Ports: 11211 → 36941 (mainnet RPC), 46941 (testnet RPC) - Wallet: 11212 → 36944/46944 - Address prefix: iTHN - URLs: zano.org → lethean.io - Explorer links: explorer.lthn.io Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
84 lines
2.8 KiB
Docker
84 lines
2.8 KiB
Docker
# Production pool server: builds native deps then runs the mining pool.
|
|
# Requires Redis and MySQL at runtime (see docker-compose or env config).
|
|
#
|
|
# Build context must be the parent directory (zano-upstream/), e.g.:
|
|
# docker build -f zano-nodejs-pool/Dockerfile -t lethean-pool .
|
|
#
|
|
# Runtime env:
|
|
# REDIS_HOST, REDIS_PORT — Redis connection
|
|
# MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB — MySQL connection
|
|
# (or mount a config.json over /app/config.json)
|
|
|
|
FROM node:22 AS builder
|
|
|
|
# Native build dependencies for cryptonote-util and other C++ addons
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
python3 \
|
|
python3-pip \
|
|
libboost-system-dev \
|
|
libboost-date-time-dev \
|
|
libboost-thread-dev \
|
|
libboost-serialization-dev \
|
|
libboost-iostreams-dev \
|
|
libboost-locale-dev \
|
|
libzmq3-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /workspace
|
|
|
|
# Build the local cryptonote-util dependency first
|
|
COPY blockchain/ ./blockchain/
|
|
RUN mkdir -p blockchain/build/release/src/config
|
|
COPY blockchain/build/release/src/config/currency_config.h \
|
|
blockchain/build/release/src/config/currency_config.h
|
|
|
|
COPY zano-node-util/package.json zano-node-util/package-lock.json ./zano-node-util/
|
|
COPY zano-node-util/binding.gyp zano-node-util/main.cc zano-node-util/index.js ./zano-node-util/
|
|
RUN ln -sf /workspace/blockchain /workspace/zano-node-util/Lethean
|
|
RUN cd zano-node-util && npm ci && npm rebuild --build-from-source
|
|
|
|
# Build the pool itself
|
|
COPY zano-nodejs-pool/package.json zano-nodejs-pool/package-lock.json ./zano-nodejs-pool/
|
|
|
|
# Rewrite the local dep path so npm resolves the already-built addon
|
|
RUN cd zano-nodejs-pool && \
|
|
node -e " \
|
|
const fs = require('fs'); \
|
|
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); \
|
|
pkg.dependencies['cryptonote-util'] = 'file:../zano-node-util'; \
|
|
if (pkg.optionalDependencies) { \
|
|
pkg.optionalDependencies['lethean-util'] = 'file:../zano-node-util'; \
|
|
} \
|
|
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2)); \
|
|
"
|
|
|
|
RUN cd zano-nodejs-pool && npm ci --ignore-scripts
|
|
# Rebuild native addons explicitly after all sources are present
|
|
RUN cd zano-nodejs-pool && npm rebuild
|
|
|
|
COPY zano-nodejs-pool/ ./zano-nodejs-pool/
|
|
|
|
# Production image — keep build tools out
|
|
FROM node:22-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libboost-system1.74.0 \
|
|
libboost-date-time1.74.0 \
|
|
libboost-thread1.74.0 \
|
|
libboost-serialization1.74.0 \
|
|
libboost-iostreams1.74.0 \
|
|
libboost-locale1.74.0 \
|
|
libzmq5 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /workspace/zano-nodejs-pool ./
|
|
COPY --from=builder /workspace/zano-node-util /workspace/zano-node-util
|
|
|
|
# Stratum port and HTTP API port
|
|
EXPOSE 5555
|
|
EXPOSE 8117
|
|
|
|
CMD ["node", "init.js"]
|