Pass NODE_COUNT into docker-compose

This commit is contained in:
Vitaliy Potyarkin 2024-09-23 14:01:59 +00:00
parent c0032e252c
commit 006e0e013d
2 changed files with 12 additions and 0 deletions

View file

@ -5,6 +5,12 @@ NODE_CONFIG=data/config-$(NODE_LETTER)/protocol.privnet.yml
NODE_LETTER=$(word $(NODE_ID),$(ALPHABET))
NODE_MINPEERS=$(call math,$(NODE_COUNT)>1)
export NODE_COUNT
export NODE_ID
export NODE_CONFIG
export NODE_LETTER
export NODE_MINPEERS
SHELL=/bin/bash
.SHELLFLAGS=-euo pipefail -c

View file

@ -13,6 +13,12 @@ services:
networks:
bringup-network:
user: "${UID}:${GID}"
environment:
- NODE_COUNT=$NODE_COUNT
- NODE_ID=$NODE_ID
- NODE_CONFIG=$NODE_CONFIG
- NODE_LETTER=$NODE_LETTER
- NODE_MINPEERS=$NODE_MINPEERS
volumes:
- ..:/bringup
working_dir: /bringup/morph