-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/alpha' into master-into-alpha
- Loading branch information
Showing
32 changed files
with
490 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.git | ||
.env* | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
FROM node:18 | ||
FROM node:lts-alpine3.17 AS builder | ||
|
||
RUN apk add --no-cache \ | ||
python3 \ | ||
make \ | ||
cmake \ | ||
g++ \ | ||
jq | ||
|
||
WORKDIR /app/builder | ||
RUN chown -R node: /app | ||
|
||
USER node | ||
|
||
COPY --chown=node:node . . | ||
|
||
RUN yarn install \ | ||
--ignore-scripts \ | ||
--frozen-lockfile \ | ||
--no-progress && \ | ||
yarn build && \ | ||
yarn remove $(cat package.json | jq -r '.devDependencies | keys | join(" ")') && \ | ||
rm -r /home/node/.cache/ | ||
|
||
FROM node:lts-alpine3.17 | ||
WORKDIR /home/node | ||
ENV NODE_ENV production | ||
|
||
# cache yarn install step | ||
COPY --chown=node:node package.json /home/node | ||
COPY --chown=node:node yarn.lock /home/node | ||
RUN yarn --frozen-lockfile | ||
COPY --from=builder --chown=node:node /app/builder/node_modules ./node_modules | ||
COPY --from=builder --chown=node:node /app/builder/dist/ ./dist | ||
|
||
COPY --chown=node:node . /home/node | ||
|
||
USER node | ||
RUN yarn build | ||
ENTRYPOINT ["/bin/bash", "./docker-entrypoint.sh"] | ||
CMD [ "node", "dist/main.js" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
/usr/local/bin/polymesh \ | ||
-d /var/lib/polymesh \ | ||
--unsafe-ws-external --unsafe-rpc-external --wasm-execution=compiled \ | ||
--no-prometheus --no-telemetry --pruning=archive --no-mdns \ | ||
--validator --rpc-cors=all --rpc-methods=unsafe --force-authoring \ | ||
--port 30333 $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -exu -o pipefail | ||
|
||
declare nextVersion=$1 | ||
|
||
# This needs to be set to and SDK compatible value | ||
CHAIN_TAG='6.0.0-develop-debian' | ||
|
||
# This lets it work on arm64, like Mac Books | ||
ARCHITECTURE=$(uname -m) | ||
CHAIN_REPO=polymeshassociation/polymesh | ||
if [ "$ARCHITECTURE" = "arm64" ]; then | ||
CHAIN_REPO="polymeshassociation/polymesh-arm64" | ||
fi | ||
|
||
sed -i.bak -e "s/.setVersion('.*')/.setVersion('$nextVersion')/g" src/main.ts | ||
rm src/main.ts.bak | ||
|
||
SWAGGER_VERSION=$nextVersion POLYMESH_NODE_URL='wss://testnet-rpc.polymesh.live' yarn generate:swagger > /dev/null 2>&1 | ||
export CHAIN_IMAGE="$CHAIN_REPO:$CHAIN_TAG" | ||
|
||
docker compose up -d chain | ||
|
||
SWAGGER_VERSION=$nextVersion POLYMESH_NODE_URL='ws://localhost:9944' yarn generate:swagger > /dev/null 2>&1 | ||
|
||
docker compose down chain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.