Skip to content

Commit 2f1aed2

Browse files
authored
Support custom image (#14)
1 parent f7c1986 commit 2f1aed2

3 files changed

Lines changed: 17 additions & 9 deletions

File tree

readme.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
```bash
1313
Options:
14-
--help Show help [boolean]
15-
--version Show version number [boolean]
16-
--out, -o Out of result [string] [required]
17-
--config, -c Path to config file [string]
18-
--mode, -m Compile mode [choices: "json", "typescript"] [default: "json"]
19-
--node, -n Need up node (port 6869) [boolean]
20-
--explorer, -e Need up explorer (port 3000) [boolean]
14+
--help Show help [boolean]
15+
--version Show version number [boolean]
16+
--out, -o Out of result [string] [required]
17+
--config, -c Path to config file [string]
18+
--mode, -m Compile mode [choices: "json", "typescript"] [default: "json"]
19+
--node, -n Need up node (port 6869) [boolean]
20+
--explorer, -e Need up explorer (port 3000) [boolean]
21+
--image, -i Node image, [string] [default: "wavesplatform/waves-private-node"]
2122
```
2223

2324
### Usage example

src/args.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@ const data = options({
3636
},
3737
verbose: {
3838
type: 'boolean'
39+
},
40+
image: {
41+
type: 'string',
42+
alias: 'i',
43+
default: 'wavesplatform/waves-private-node'
3944
}
4045
}).parseSync();
4146

4247
export const out = data.out;
4348
export const config = data.config;
4449
export const mode = data.mode as 'json' | 'typescript';
4550
export const upNode = data.upNode;
46-
export const runTests = data.runTests;
51+
export const runTests = data.runTests
52+
export const image = data.image
4753
console.level = data.verbose ? 'verbose' : 'errors';

src/middlewares/node.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { CHAIN_ID, DOCKER_NETWORK, MASTER_ACCOUNT_SEED, NODE_API_PORT, NODE_URL } from '../constants';
22
import { isRunImage, remove, run, stop } from '../utils/docker';
3+
import { image } from '../args';
34

4-
const NODE_IMAGE = 'wavesplatform/waves-private-node';
5+
const NODE_IMAGE = image;
56

67
export default async (ctx: any, next: any) => {
78
console.info(`NODE_URL ${NODE_URL}`);

0 commit comments

Comments
 (0)