diff --git a/config/bootstrap_environment.sh b/config/bootstrap_environment.sh index f5e2382361..deb039cedc 100644 --- a/config/bootstrap_environment.sh +++ b/config/bootstrap_environment.sh @@ -1,6 +1,6 @@ #!/bin/sh -# this is temporal solution +# this is temporary solution export IROHA_PEER_PUBKEY_PATH=/home/bogdan/iroha/testbase.pub export IROHA_PEER_PRIVKEY_PATH=/home/bogdan/iroha/testbase.priv export IROHA_POSTGRES_HOST=localhost diff --git a/docker/docker-compose-ametsuchi-dev.yml b/docker/docker-compose-ametsuchi-dev.yml new file mode 100644 index 0000000000..0d1969a55b --- /dev/null +++ b/docker/docker-compose-ametsuchi-dev.yml @@ -0,0 +1,81 @@ +version: '3' + +# How to run: +# docker-compose -f docker-compose-dev.yml up +# +# This file creates persistent redis and postgres containers. +# Even after container removal stored data will be available. +# +# redis: +# - host: 192.168.9.3 +# - port: 6379 +# postgres: +# - host: 192.168.9.4 +# - port: 5432 +# - user: kek +# - password: helloworld + +services: + node: + image: lebdron/iroha-dev + environment: + - IROHA_PEER_PUBKEY_PATH=/home/bogdan/iroha/testbase.pub + - IROHA_PEER_PRIVKEY_PATH=/home/bogdan/iroha/testbase.priv + - IROHA_POSTGRES_HOST=192.168.9.4 + - IROHA_POSTGRES_PORT=5432 + - IROHA_POSTGRES_USER=kek + - IROHA_POSTGRES_PASSWORD=helloworld + - IROHA_REDIS_HOST=192.168.9.3 + - IROHA_REDIS_PORT=6379 + - IROHA_KAFKA_HOST=localhost + - IROHA_KAFKA_PORT=2181 + - IROHA_PATH=/home/bogdan/iroha + - IROHA_VERBOSITY=debug # debug, info, warning, error, critical, debug, trace, off + volumes: + - ../:/iroha + stdin_open: true + tty: true + user: $UID:$UID + working_dir: /iroha + networks: + peernet: + ipv4_address: 192.168.9.2 + + + redis: + image: redis:3.2.8 + volumes: + - redis_data:/data + networks: + peernet: + ipv4_address: 192.168.9.3 + + + postgres: + image: postgres:9.5 + environment: + - POSTGRES_USER=kek + - POSTGRES_PASSWORD=helloworld + volumes: + - postgresql:/var/lib/postgresql + - postgresql_data:/var/lib/postgresql/data + networks: + peernet: + ipv4_address: 192.168.9.4 + + +# network for single peer +networks: + peernet: + driver: bridge + ipam: + driver: default + config: + - subnet: 192.168.9.0/24 + + +# make persistence for docker containers +volumes: + redis_data: + postgresql: + postgresql_data: \ No newline at end of file diff --git a/docker/run-ametsuchi-dev.sh b/docker/run-ametsuchi-dev.sh new file mode 100755 index 0000000000..f868f6f99c --- /dev/null +++ b/docker/run-ametsuchi-dev.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# change dir to script's file +cd "$(dirname "$0")" + +docker-compose -f docker-compose-ametsuchi-dev.yml down +export UID +docker-compose -f docker-compose-ametsuchi-dev.yml up -d +docker-compose -f docker-compose-ametsuchi-dev.yml exec node /bin/bash