From d96731ff63a3e4813779deb95215ac3d4f347076 Mon Sep 17 00:00:00 2001 From: librelois <c@elo.tf> Date: Tue, 18 Jan 2022 02:59:16 +0100 Subject: [PATCH] doc: document docker usage and add other compose file example --- README.md | 30 +++++++++ .../gdem-local2.docker-compose.yml | 61 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 docker/compose-examples/gdem-local2.docker-compose.yml diff --git a/README.md b/README.md index 0a05860e0..6427ce709 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,36 @@ A rewriting of duniter based on [Substrate](https://www.substrate.io/) framework. +## Usage + +### Docker + +The easiest way to use duniter-v2s is to use the docker image. + +#### Releases images + +For the moment, duniter-v2s does not have a first release yet. + +#### Test images + +At each commit on master, an image with the tag `debug-sha-********` is published, where `********` +corresponds to the first 8 hash characters of the commit. + +Usage example: + +```docker +docker run -it -p9944:9944 --name duniter-v2s duniter/duniter-v2s:debug-sha-9bc16904 --dev --ws-external +``` + +### Docker compose + +This repository contains a docker-compose file at the root of the repository, it is configured to +be able to launch a development node on the ÄŸdev currency (single-node currency). + +Other docker-compose files are suggested in the `docker/compose-examples` folder: + +- `gtest-local2.docker-compose.yml`: Configured to launch 2 validators on ÄŸdem currency. + ## Setup First, complete the [basic setup instructions](./docs/setup.md). diff --git a/docker/compose-examples/gdem-local2.docker-compose.yml b/docker/compose-examples/gdem-local2.docker-compose.yml new file mode 100644 index 000000000..14f5dc037 --- /dev/null +++ b/docker/compose-examples/gdem-local2.docker-compose.yml @@ -0,0 +1,61 @@ +version: "3.5" + +services: + duniter-1: + container_name: duniter-1 + image: duniter/duniter-v2s:local + ports: + # telemetry + - "127.0.0.1:9615:9615" + # rpc + - "127.0.0.1:9933:9933" + # rpc-ws + - "127.0.0.1:9944:9944" + # p2p + - "30333:30333" + environment: + DUNITER_INSTANCE_NAME: "my_instance" + DUNITER_CHAIN_NAME: "local" + #DUNITER_DISABLE_PROMETHEUS: "false" + command: ["--alice", "--node-key", "0000000000000000000000000000000000000000000000000000000000000001"] + volumes: + - data:/var/lib/lc-core + networks: + app_net: + ipv4_address: 172.16.238.10 + + + duniter-2: + container_name: duniter-2 + image: duniter/duniter-v2s:local + ports: + # telemetry + - "127.0.0.1:9616:9615" + # rpc + - "127.0.0.1:9934:9933" + # rpc-ws + - "127.0.0.1:9945:9944" + # p2p + - "30334:30333" + environment: + DUNITER_INSTANCE_NAME: "my_instance" + DUNITER_CHAIN_NAME: "local" + #DUNITER_DISABLE_PROMETHEUS: "false" + command: ["--bob", "--bootnodes", "/ip4/172.16.238.10/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"] + volumes: + - data2:/var/lib/lc-core + networks: + app_net: + ipv4_address: 172.16.238.11 + +volumes: + data: + data2: + +networks: + app_net: + driver: bridge + ipam: + driver: default + config: + - subnet: 172.16.238.0/24 -- GitLab