Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115678
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
12 KB
Subscribers
None
View Options
diff --git a/cashtab.Dockerfile b/cashtab.Dockerfile
index 8b101f7bc..a6ba554fa 100644
--- a/cashtab.Dockerfile
+++ b/cashtab.Dockerfile
@@ -1,121 +1,121 @@
# Multi-stage
# 1) rust image for ecash-lib
# 2) Node image for building frontend assets
# 3) nginx stage to serve frontend assets
# Stage 1 - rust machine for building ecash-lib-wasm
FROM rust:1.76.0 AS wasmbuilder
RUN apt-get update \
&& apt-get install clang binaryen -y \
&& rustup target add wasm32-unknown-unknown \
- && cargo install -f wasm-bindgen-cli@0.2.92
+ && cargo install -f --locked wasm-bindgen-cli@0.2.92
# Copy Cargo.toml
WORKDIR /app/
COPY Cargo.toml .
# Copy chronik to same directory structure as monorepo
# This needs to be in place to run ./build-wasm
WORKDIR /app/chronik/
COPY chronik/ .
# explorer must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/web/explorer
COPY web/explorer/ .
# bitcoinsuite-chronik-client must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/modules/bitcoinsuite-chronik-client
COPY modules/bitcoinsuite-chronik-client/ .
# Copy secp256k1 to same directory structure as monorepo
WORKDIR /app/src/secp256k1
COPY src/secp256k1/ .
# Copy ecash-secp256k1, ecash-lib and ecash-lib-wasm files to same directory structure as monorepo
WORKDIR /app/modules/ecash-secp256k1
COPY modules/ecash-secp256k1 .
WORKDIR /app/modules/ecash-lib
COPY modules/ecash-lib .
WORKDIR /app/modules/ecash-lib-wasm
COPY modules/ecash-lib-wasm .
# Build web assembly for ecash-lib
RUN CC=clang ./build-wasm.sh
# Stage 2
FROM node:20-bookworm-slim AS builder
# Copy static assets from wasmbuilder stage (ecash-lib-wasm and ecash-lib, with wasm built in place)
WORKDIR /app/modules
COPY --from=wasmbuilder /app/modules .
# Build all local Cashtab dependencies
# ecashaddrjs
WORKDIR /app/modules/ecashaddrjs
COPY modules/ecashaddrjs/ .
RUN npm ci
RUN npm run build
# chronik-client
WORKDIR /app/modules/chronik-client
COPY modules/chronik-client/ .
RUN npm ci
RUN npm run build
# mock-chronik-client
WORKDIR /app/modules/mock-chronik-client
COPY modules/mock-chronik-client/ .
RUN npm ci
RUN npm run build
# b58-ts (required for ecash-lib)
WORKDIR /app/modules/b58-ts
COPY modules/b58-ts .
RUN npm ci
# ecash-lib
WORKDIR /app/modules/ecash-lib
RUN npm ci
RUN npm run build
# ecash-agora
WORKDIR /app/modules/ecash-agora
COPY modules/ecash-agora/ .
RUN npm ci
RUN npm run build
# ecash-script
WORKDIR /app/modules/ecash-script
COPY modules/ecash-script/ .
RUN npm ci
# Now that local dependencies are ready, build cashtab
WORKDIR /app/cashtab
# Copy only the package files and install necessary dependencies.
# This reduces cache busting when source files are changed.
COPY cashtab/package.json .
COPY cashtab/package-lock.json .
# Docker should not rebuild deps just because package.json version bump
# So, always keep package.json and package-lock.json at 1.0.0 in the docker image
# Note: it will be overwritten before npm run build by the latest package.json
RUN npm version --allow-same-version 1.0.0
RUN npm ci
# Copy the rest of the project files and build
COPY cashtab/ .
RUN npm run build
# Stage 3
FROM nginx
ARG NGINX_CONF=nginx.conf
COPY cashtab/$NGINX_CONF /etc/nginx/conf.d/default.conf
# Set working directory to nginx asset directory
# Copy static assets from builder stage
COPY --from=builder /app/cashtab/build /usr/share/nginx/html/
# Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"]
diff --git a/ecash-herald.Dockerfile b/ecash-herald.Dockerfile
index 4ebc1c8ce..04638b5df 100644
--- a/ecash-herald.Dockerfile
+++ b/ecash-herald.Dockerfile
@@ -1,116 +1,116 @@
# Copyright (c) 2024 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Multi-stage
# 1) rust image for ecash-lib
# 2) Node image for prod deployment of ecash-lib
# 1) rust image for ecash-lib
FROM rust:1.76.0 AS wasmbuilder
RUN apt-get update \
&& apt-get install clang binaryen -y \
&& rustup target add wasm32-unknown-unknown \
- && cargo install -f wasm-bindgen-cli@0.2.92
+ && cargo install -f --locked wasm-bindgen-cli@0.2.92
# Copy Cargo.toml
WORKDIR /app/
COPY Cargo.toml .
# Copy chronik to same directory structure as monorepo
# This needs to be in place to run ./build-wasm
WORKDIR /app/chronik/
COPY chronik/ .
# explorer must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/web/explorer
COPY web/explorer/ .
# bitcoinsuite-chronik-client must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/modules/bitcoinsuite-chronik-client
COPY modules/bitcoinsuite-chronik-client/ .
# Copy secp256k1 to same directory structure as monorepo
WORKDIR /app/src/secp256k1
COPY src/secp256k1/ .
# Copy ecash-secp256k1, ecash-lib and ecash-lib-wasm files to same directory structure as monorepo
WORKDIR /app/modules/ecash-secp256k1
COPY modules/ecash-secp256k1 .
WORKDIR /app/modules/ecash-lib
COPY modules/ecash-lib .
WORKDIR /app/modules/ecash-lib-wasm
COPY modules/ecash-lib-wasm .
# Build web assembly for ecash-lib
RUN CC=clang ./build-wasm.sh
# 2) Node image for prod deployment of token-server
# Node image for prod deployment of ecash-herald
FROM node:20-bookworm-slim
# Copy static assets from wasmbuilder stage (ecash-lib-wasm and ecash-lib, with wasm built in place)
WORKDIR /app/modules
COPY --from=wasmbuilder /app/modules .
# Build all local ecash-herald dependencies
# ecashaddrjs
WORKDIR /app/modules/ecashaddrjs
COPY modules/ecashaddrjs/ .
RUN npm ci
RUN npm run build
# chronik-client
WORKDIR /app/modules/chronik-client
COPY modules/chronik-client/ .
RUN npm ci
RUN npm run build
# ecash-script
WORKDIR /app/modules/ecash-script
COPY modules/ecash-script/ .
RUN npm ci
# b58-ts (required for ecash-lib)
WORKDIR /app/modules/b58-ts
COPY modules/b58-ts .
RUN npm ci
# ecash-lib
WORKDIR /app/modules/ecash-lib
RUN npm ci
RUN npm run build
# ecash-agora
WORKDIR /app/modules/ecash-agora
COPY modules/ecash-agora/ .
RUN npm ci
RUN npm run build
# mock-chronik-client
WORKDIR /app/modules/mock-chronik-client
COPY modules/mock-chronik-client/ .
RUN npm ci
RUN npm run build
# Now that local dependencies are ready, build ecash-herald
WORKDIR /app/apps/ecash-herald
# Copy only the package files and install necessary dependencies.
# This reduces cache busting when source files are changed.
COPY apps/ecash-herald/package.json .
COPY apps/ecash-herald/package-lock.json .
RUN npm ci
# Copy the rest of the project files
COPY apps/ecash-herald/ .
# Compile typescript. Outputs to dist/ dir
RUN npm run build
# ecash-herald runs with "node dist/index.js"
CMD [ "node", "dist/index.js" ]
diff --git a/ecash-lib.Dockerfile b/ecash-lib.Dockerfile
index 64d54138d..d518aa53a 100644
--- a/ecash-lib.Dockerfile
+++ b/ecash-lib.Dockerfile
@@ -1,64 +1,64 @@
# Copyright (c) 2024 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Stage 1 - rust machine for building ecash-lib-wasm
FROM rust:1.76.0 AS wasmbuilder
RUN apt-get update \
&& apt-get install clang binaryen -y \
&& rustup target add wasm32-unknown-unknown \
- && cargo install -f wasm-bindgen-cli@0.2.92
+ && cargo install -f --locked wasm-bindgen-cli@0.2.92
# Copy Cargo.toml
WORKDIR /app/
COPY Cargo.toml .
# Copy chronik to same directory structure as monorepo
# This needs to be in place to run ./build-wasm
WORKDIR /app/chronik/
COPY chronik/ .
# explorer must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/web/explorer
COPY web/explorer/ .
# bitcoinsuite-chronik-client must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/modules/bitcoinsuite-chronik-client
COPY modules/bitcoinsuite-chronik-client/ .
# Copy secp256k1 to same directory structure as monorepo
WORKDIR /app/src/secp256k1
COPY src/secp256k1/ .
# Copy ecash-secp256k1, ecash-lib and ecash-lib-wasm files to same directory structure as monorepo
WORKDIR /app/modules/ecash-secp256k1
COPY modules/ecash-secp256k1 .
WORKDIR /app/modules/ecash-lib
COPY modules/ecash-lib .
WORKDIR /app/modules/ecash-lib-wasm
COPY modules/ecash-lib-wasm .
# Build web assembly for ecash-lib
RUN CC=clang ./build-wasm.sh
# Stage 2 - Node image for running npm publish
FROM node:20-bookworm-slim
# Copy static assets from wasmbuilder stage (ecash-lib-wasm and ecash-lib, with wasm built in place)
WORKDIR /app/modules
COPY --from=wasmbuilder /app/modules .
# Build ecash-lib
WORKDIR /app/modules/ecash-lib
# Install b58-ts from npm, so that module users install it automatically
RUN npm install b58-ts@latest
# Install ecashaddrjs from npm, so that module users install it automatically
RUN npm install ecashaddrjs@latest
# Install chronik-client from npm, so that module users install it automatically
RUN npm install -D chronik-client@latest
RUN npm ci
RUN npm run build
# Publish ecash-lib
CMD [ "npm", "publish" ]
diff --git a/modules/ecash-lib-wasm/Dockerfile b/modules/ecash-lib-wasm/Dockerfile
index 6d22a37b0..de22e057b 100644
--- a/modules/ecash-lib-wasm/Dockerfile
+++ b/modules/ecash-lib-wasm/Dockerfile
@@ -1,10 +1,10 @@
# Copyright (c) 2024 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
FROM rust:1.76.0
RUN apt-get update \
&& apt-get install clang binaryen -y \
&& rustup target add wasm32-unknown-unknown \
- && cargo install -f wasm-bindgen-cli@0.2.92
+ && cargo install -f --locked wasm-bindgen-cli@0.2.92
diff --git a/token-server.Dockerfile b/token-server.Dockerfile
index c5b0d11a8..03e75d886 100644
--- a/token-server.Dockerfile
+++ b/token-server.Dockerfile
@@ -1,97 +1,97 @@
# Copyright (c) 2024 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Multi-stage
# 1) rust image for ecash-lib
# 2) Node image for prod deployment of token-server
# 1) rust image for ecash-lib
FROM rust:1.76.0 AS wasmbuilder
RUN apt-get update \
&& apt-get install clang binaryen -y \
&& rustup target add wasm32-unknown-unknown \
- && cargo install -f wasm-bindgen-cli@0.2.92
+ && cargo install -f --locked wasm-bindgen-cli@0.2.92
# Copy Cargo.toml
WORKDIR /app/
COPY Cargo.toml .
# Copy chronik to same directory structure as monorepo
# This needs to be in place to run ./build-wasm
WORKDIR /app/chronik/
COPY chronik/ .
# explorer must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/web/explorer
COPY web/explorer/ .
# bitcoinsuite-chronik-client must be in place to to run ./build-wasm as it is a workspace member
WORKDIR /app/modules/bitcoinsuite-chronik-client
COPY modules/bitcoinsuite-chronik-client/ .
# Copy secp256k1 to same directory structure as monorepo
WORKDIR /app/src/secp256k1
COPY src/secp256k1/ .
# Copy ecash-secp256k1, ecash-lib and ecash-lib-wasm files to same directory structure as monorepo
WORKDIR /app/modules/ecash-secp256k1
COPY modules/ecash-secp256k1 .
WORKDIR /app/modules/ecash-lib
COPY modules/ecash-lib .
WORKDIR /app/modules/ecash-lib-wasm
COPY modules/ecash-lib-wasm .
# Build web assembly for ecash-lib
RUN CC=clang ./build-wasm.sh
# 2) Node image for prod deployment of token-server
FROM node:20-bookworm-slim
# Copy static assets from wasmbuilder stage (ecash-lib-wasm and ecash-lib, with wasm built in place)
WORKDIR /app/modules
COPY --from=wasmbuilder /app/modules .
# Build all local token-server dependencies
# ecashaddrjs
WORKDIR /app/modules/ecashaddrjs
COPY modules/ecashaddrjs/ .
RUN npm ci
RUN npm run build
# chronik-client
WORKDIR /app/modules/chronik-client
COPY modules/chronik-client/ .
RUN npm ci
RUN npm run build
# b58-ts (required for ecash-lib)
WORKDIR /app/modules/b58-ts
COPY modules/b58-ts .
RUN npm ci
# ecash-lib
WORKDIR /app/modules/ecash-lib
RUN npm ci
RUN npm run build
# Now that local dependencies are ready, build token-server
WORKDIR /app/apps/token-server
# Copy only the package files and install necessary dependencies.
# This reduces cache busting when source files are changed.
COPY apps/token-server/package.json .
COPY apps/token-server/package-lock.json .
RUN npm ci
# Copy the rest of the project files
COPY apps/token-server/ .
# Compile typescript. Outputs to dist/ dir
RUN npm run build
# token-server runs with "node dist/index.js"
CMD [ "node", "dist/index.js" ]
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Mar 2, 11:43 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187675
Default Alt Text
(12 KB)
Attached To
rABC Bitcoin ABC
Event Timeline
Log In to Comment