This commit is contained in:
Alexey Proshutinskiy 2021-09-21 18:48:10 +03:00
parent c999fbc0ef
commit ef1a7b9dfa
6 changed files with 39 additions and 3 deletions

View File

@ -3,3 +3,4 @@
2. Run `docker compose up -d` to start Fluence node
3. Go back to `../example`
4. Run `npm run start`
2

View File

@ -33,7 +33,8 @@ let local: Node[] = [
];
async function main(environment: Node[]) {
await Fluence.start({ connectTo: environment[0] });
let mgmt_keypair = await KeyPair.fromBytes(bs58.decode("/tmp/fluence/builtins_secret_key.ed25519:/.fluence/v1/builtins_secret_key.ed25519"));
await Fluence.start({ connectTo: environment[0] , KeyPair: mgmt_keypair});
console.log(
"📗 created a fluence peer %s with relay %s",
Fluence.getStatus().peerId,

View File

@ -0,0 +1 @@
5FwE32bDcphFzuMca7Y2qW1gdR64fTBYoRNvD4MLE1hecDGhCMQGKn8aseMr5wRo4Xo2CRFdrEAawUNLYkgQD78K

View File

@ -1,4 +1,4 @@
# management secret key is NAB5rGwT4qOEB+6nLQawkTfCOV2eiFSjgQK8bfEdZXY=
# management base58 or base64 secret key is NAB5rGwT4qOEB+6nLQawkTfCOV2eiFSjgQK8bfEdZXY=
services:
fluence-0: # /ip4/127.0.0.1/tcp/9990/ws/p2p/12D3KooWHBG9oaVx4i3vi6c1rSBUm7MLBmyGmmbHoZ23pmjDCnvK
command: -f ed25519 -k 29Apzfedhw2Jxh94Jj4rNSmavQ1TkNe8ALYRA7bMegobwp423aLrURxLk32WtXgXHDqoSz7GAT9fQfoMhVd1e5Ww -m 12D3KooWFRgVmb1uWcmCbmJqLr8tBQghL6ysSpK2VyE2VZbaQ6wy -t 7770 -w 9990 # --bootstraps /dns4/fluence-1/tcp/7771 /dns4/fluence-2/tcp/7772
@ -18,6 +18,7 @@ services:
volumes:
- fluence-0:/.fluence
- data-0:/config
- ./builtins_secret_key.ed25519:/.fluence/v1/builtins_secret_key.ed25519
networks:
- fluence
@ -73,4 +74,4 @@ volumes:
# data-2:
networks:
fluence:
fluence: null

31
local-network/fluence.yml Normal file
View File

@ -0,0 +1,31 @@
version: "3.8"
services:
fluence-0: # /ip4/127.0.0.1/tcp/9990/ws/p2p/12D3KooWHBG9oaVx4i3vi6c1rSBUm7MLBmyGmmbHoZ23pmjDCnvK
command: -m 12D3KooWFRgVmb1uWcmCbmJqLr8tBQghL6ysSpK2VyE2VZbaQ6wy -t 7770 -w 9990 # --bootstraps /dns4/fluence-1/tcp/7771 /dns4/fluence-2/tcp/7772
container_name: fluence-0
environment:
RUST_BACKTRACE: full
RUST_LOG: info,network=trace,aquamarine=info,aquamarine::actor=info,tokio_threadpool=info,tokio_reactor=info,mio=info,tokio_io=info,soketto=info,yamux=info,multistream_select=info,libp2p_secio=info,libp2p_websocket::framed=info,libp2p_ping=info,libp2p_core::upgrade::apply=info,libp2p_kad::kbucket=info,cranelift_codegen=info,wasmer_wasi=info,async_io=info,polling=info,wasmer_interface_types_fl=info,cranelift_codegen=info,wasmer_wasi=info,async_io=info,polling=info,wasmer_interface_types_fl=info,particle_server::behaviour::identify=info,libp2p_mplex=info,libp2p_identify=info,walrus=info,particle_protocol::libp2p_protocol::upgrade=info,kademlia::behaviour=info
WASM_LOG: info
image: fluencelabs/node:tg_test
ports:
- 7770:7770 # tcp
- 9990:9990 # ws
- 5000:5001 # ipfs rpc
- 4000:4001 # ipfs swarm
- 18080:18080 # /metrics
restart: always
volumes:
- fluence-0:/.fluence
- data-0:/config
- ./secret_key.ed25519:/.fluence/v1/secret_key.ed25519
- ./builtins_secret_key.ed25519:/.fluence/v1/builtins_secret_key.ed25519
networks:
- fluence
volumes:
fluence-0:
data-0:
networks:
fluence: null

View File

@ -0,0 +1 @@
3eRPuC6vrSzYER2j2SvuYNAifdioxswJtUgdchmMPn4cYBQKmqqWTPg3Dkici8vRPRzpEJ4FPUQShzd4tBJunzoF