Skip to content

Commit

Permalink
refactor(cmd-socketio-server): remove code duplication
Browse files Browse the repository at this point in the history
- Move config-reading and signMessageJwt helper functions from validators to cmd-socketio-server
  to remove code duplication. Refactor validators to use these common instead of own implementation.
- Remove ValidatorAuthentication.ts that is not used anymore
  (not part of public interface, it was copied by validators during before couple commits ago).
- Updated readme with instructions of how to start asset-trade and electricity-trade samples
  without docker-compose (to be used during development).
  Added helper script for patching the config.
- Remove dependency on Indy SDK for the main build
  (it's needed only for running dockerless discounted-cartrade sample now)
- Update legacy-socketio-connector Dockerfiles to work after updates.

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
  • Loading branch information
outSH authored and izuru0 committed Nov 18, 2022
1 parent 5bba7c0 commit 673f122
Show file tree
Hide file tree
Showing 53 changed files with 688 additions and 592 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The `npm run watch` script in action:
* Docker Compose
* OpenJDK (Corda support Java 8 JDK but do not currently support Java 9 or higher)
* `sudo apt install openjdk-8-jdk-headless`
* Indy SDK
* Indy SDK (optional)
* [Installing the SDK](https://github.com/hyperledger/indy-sdk#installing-the-sdk)
* [Build the SDK from source](https://github.com/hyperledger/indy-sdk#how-to-build-indy-sdk-from-source)

Expand Down
9 changes: 5 additions & 4 deletions examples/cactus-example-discounted-asset-trade/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM cactus-cmd-socketio-server:latest

ARG NPM_PKG_VERSION=latest
ARG INDY_SDK_PKG_VERSION=1.16.0-dev-1649

ENV APP_HOME=/root/cactus

Expand All @@ -9,17 +10,17 @@ WORKDIR ${APP_HOME}
# Required by indy-sdk
RUN apt-get update \
&& apt-get install -y libsodium23 \
libssl1.1 \
libzmq5 \
libssl1.1 \
libzmq5 \
&& rm -rf /var/lib/apt/lists/*

# Copy indy sdk lib from base ubuntu image
# Note - indy_sdk:latest must be ABI compatible with this image OS
COPY --from=indy-sdk-cli:latest /usr/lib/libindy.so /usr/lib/

COPY ./package.json ./dist/yarn.lock ./
RUN yarn add "${CACTUS_CMD_SOCKETIO_PATH}" "@hyperledger/cactus-verifier-client@${NPM_PKG_VERSION}" \
--production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \
RUN yarn add "${CACTUS_CMD_SOCKETIO_PATH}" "@hyperledger/cactus-verifier-client@${NPM_PKG_VERSION}" "indy-sdk@${INDY_SDK_PKG_VERSION}" \
--production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \
rm -rf ./.yarnCache

COPY ./dist ./dist/
Expand Down
Loading

0 comments on commit 673f122

Please sign in to comment.