Merge pull request #946 from nymtech/feature/docker-updates
Docker updates
This commit is contained in:
@@ -13,7 +13,7 @@ The platform is composed of multiple Rust crates. Top-level executable binary cr
|
||||
* nym-gateway - acts sort of like a mailbox for mixnet messages, removing the need for directly delivery to potentially offline or firewalled devices.
|
||||
* nym-network-monitor - sends packets through the full system to check that they are working as expected, and stores node uptime histories as the basis of a rewards system ("mixmining" or "proof-of-mixing").
|
||||
* nym-explorer - a (projected) block explorer and (existing) mixnet viewer.
|
||||
* nym-wallet (currently in development) - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework.
|
||||
* nym-wallet - a desktop wallet implemented using the [Tauri](https://tauri.studio/en/docs/about/intro) framework.
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://github.com/nymtech/nym/actions?query=branch%3Adevelop)
|
||||
|
||||
+12
-18
@@ -2,7 +2,9 @@ version: '3.7'
|
||||
x-bech32-prefix: &BECH32_PREFIX
|
||||
punk
|
||||
x-wasmd-version: &WASMD_VERSION
|
||||
v0.17.0
|
||||
v0.21.0
|
||||
x-wasmd-commit-hash: &WASMD_COMMIT_HASH
|
||||
1d436638af7cacb5aeeb7248b57b085c64f3ae35
|
||||
|
||||
services:
|
||||
genesis_validator:
|
||||
@@ -11,6 +13,7 @@ services:
|
||||
args:
|
||||
BECH32_PREFIX: *BECH32_PREFIX
|
||||
WASMD_VERSION: *WASMD_VERSION
|
||||
WASMD_COMMIT_HASH: *WASMD_COMMIT_HASH
|
||||
image: validator:latest
|
||||
ports:
|
||||
- "26657:26657"
|
||||
@@ -42,6 +45,11 @@ services:
|
||||
image: contract:latest
|
||||
volumes:
|
||||
- ".:/nym"
|
||||
vesting_contract:
|
||||
build: docker/vesting_contract
|
||||
image: vesting_contract:latest
|
||||
volumes:
|
||||
- ".:/nym"
|
||||
contract_uploader:
|
||||
build: docker/typescript_client
|
||||
image: contract_uploader:typescript
|
||||
@@ -55,16 +63,6 @@ services:
|
||||
- "mixnet_contract"
|
||||
environment:
|
||||
BECH32_PREFIX: *BECH32_PREFIX
|
||||
wallet:
|
||||
build: docker/wallet-web
|
||||
image: wallet:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- "contract_volume:/contract_volume"
|
||||
- "./wallet-web:/wallet-web:ro"
|
||||
depends_on:
|
||||
- "contract_uploader"
|
||||
mnemonic_echo:
|
||||
build: docker/mnemonic_echo
|
||||
image: mnemonic_echo:latest
|
||||
@@ -79,7 +77,6 @@ services:
|
||||
- --storageEngine=wiredTiger
|
||||
volumes:
|
||||
- mongo_data:/data/db
|
||||
|
||||
block_explorer:
|
||||
build:
|
||||
context: https://github.com/forbole/big-dipper.git#v0.41.x-7
|
||||
@@ -93,13 +90,10 @@ services:
|
||||
MONGO_URL: mongodb://mongo:27017/meteor
|
||||
PORT: 3000
|
||||
METEOR_SETTINGS: ${METEOR_SETTINGS}
|
||||
|
||||
network_explorer:
|
||||
explorer:
|
||||
build:
|
||||
context: docker/network_explorer
|
||||
args:
|
||||
PERSONAL_TOKEN: ${PERSONAL_TOKEN}
|
||||
image: network_explorer:latest
|
||||
context: docker/explorer
|
||||
image: explorer:latest
|
||||
ports:
|
||||
- "3040:3000"
|
||||
depends_on:
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM node:16
|
||||
|
||||
COPY ./setup.sh /setup.sh
|
||||
CMD /setup.sh
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
git clone https://github.com/nymtech/nym.git
|
||||
|
||||
mkdir /explorer-copy
|
||||
cp -r nym/explorer/* /explorer-copy
|
||||
|
||||
cd /explorer-copy
|
||||
|
||||
npm install
|
||||
#baseUrl
|
||||
sed -i 's/https:\/\/testnet-milhon-explorer.nymtech.net\//http:\/\/localhost:3080/' ./src/api/constants.ts
|
||||
|
||||
#master validator
|
||||
sed -i 's/https:\/\/testnet-milhon-validator1.nymtech.net/http:\/\/localhost:26657/' ./src/api/constants.ts
|
||||
|
||||
#big dipper url
|
||||
sed -i 's/https:\/\/testnet-milhon-blocks.nymtech.net\//http:\/\/localhost:3080/' ./src/api/constants.ts
|
||||
|
||||
nohup npm run start
|
||||
@@ -1,8 +0,0 @@
|
||||
FROM node:14
|
||||
ARG PERSONAL_TOKEN
|
||||
RUN git clone "https://oauth2:${PERSONAL_TOKEN}@gitlab.nymte.ch/jessgess/network-explorer.git"
|
||||
|
||||
WORKDIR network-explorer
|
||||
COPY ./setup.sh /setup.sh
|
||||
RUN /setup.sh
|
||||
CMD yarn dev
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
git checkout b1ba77461a50ab6b31b8384a8f8e348141b37a43
|
||||
|
||||
sed -i 's/https:\/\/testnet-finney-blocks.nymtech.net\//http:\/\/localhost:3080/' ./layouts/default.vue
|
||||
sed -i 's/https:\/\/testnet-milhon-validator1.nymtech.net/http:\/\/localhost:26657/' networkVariables.json
|
||||
sed -i 's/https:\/\/testnet-finney-blocks.nymtech.net\//http:\/\/localhost:3080/' pages/index.vue
|
||||
|
||||
yarn install
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"dependencies": {
|
||||
"@types/node": "^14.14.22",
|
||||
"nodemon": "^2.0.7",
|
||||
"nym-validator-client": "file:/nym/clients/validator",
|
||||
"@nymproject/nym-validator-client" : "0.18.0",
|
||||
"save-dev": "0.0.1-security",
|
||||
"tasktimer": "^3.0.0",
|
||||
"ts-node": "^9.1.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// npx ts-node upload-wasm.ts
|
||||
|
||||
import ValidatorClient from "nym-validator-client";
|
||||
import ValidatorClient from "@nymproject/nym-validator-client";
|
||||
import * as fs from 'fs';
|
||||
|
||||
async function newClient(): Promise<ValidatorClient> {
|
||||
@@ -24,6 +24,9 @@ async function main() {
|
||||
// dave can upload (note: nobody else can)
|
||||
const uploadResult = await admin.upload(admin.address, wasm, undefined, "mixnet contract");//.then((uploadResult) => console.log("Upload from dave succeeded, codeId is: " + uploadResult.codeId)).catch((err) => console.log(err));
|
||||
|
||||
//todo
|
||||
//add vesting contract?
|
||||
|
||||
// Instantiate the copy of the option contract
|
||||
const { codeId } = uploadResult;
|
||||
console.log("code id is", codeId)
|
||||
|
||||
@@ -10,7 +10,7 @@ go build \
|
||||
-X github.com/cosmos/cosmos-sdk/version.AppName=nymd \
|
||||
-X github.com/CosmWasm/wasmd/app.NodeDir=.nymd \
|
||||
-X github.com/cosmos/cosmos-sdk/version.Version=${WASMD_VERSION} \
|
||||
-X github.com/cosmos/cosmos-sdk/version.Commit=1920f80d181adbeaedac1eeea1c1c6e1704d3e49 \
|
||||
-X github.com/cosmos/cosmos-sdk/version.Commit=${WASMD_COMMIT_HASH} \
|
||||
-X github.com/CosmWasm/wasmd/app.Bech32Prefix=${BECH32_PREFIX} \
|
||||
-X 'github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger'" \
|
||||
-trimpath ./cmd/wasmd
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM rust
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
CMD cd nym/contracts/vesting && RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown
|
||||
@@ -1,3 +0,0 @@
|
||||
FROM node
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
CMD /entrypoint.sh
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /wallet-web
|
||||
|
||||
yarn install
|
||||
|
||||
mkdir /wallet-copy
|
||||
cp -r /wallet-web/* /wallet-copy
|
||||
cd /wallet-copy
|
||||
|
||||
# Wait for the contract to be uploaded
|
||||
while ! [ -s /contract_volume/contract_address ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
CONTRACT_ADDRESS=$(cat /contract_volume/contract_address)
|
||||
sed -i 's/export const BONDING_CONTRACT_ADDRESS: string = "punk10pyejy66429refv3g35g2t7am0was7yalwrzen";/export const BONDING_CONTRACT_ADDRESS: string = "'"${CONTRACT_ADDRESS}"'";/' pages/_app.tsx
|
||||
sed -i 's/export const VALIDATOR_URLS: string\[\] = \[/export const VALIDATOR_URLS: string\[\] = \[ "localhost:26657",/' pages/_app.tsx
|
||||
sed -i 's/"https:\/\/testnet-milhon-validator1.nymtech.net",//' pages/_app.tsx
|
||||
sed -i 's/"https:\/\/testnet-milhon-validator2.nymtech.net",//' pages/_app.tsx
|
||||
|
||||
yarn dev
|
||||
Reference in New Issue
Block a user