Skip to content

Commit

Permalink
Merge pull request #1411 from orbs-network/refactor/1318-DRY-in-docke…
Browse files Browse the repository at this point in the history
…r-compose

docker compose DRY refactor
  • Loading branch information
Amir Arad authored Nov 3, 2019
2 parents f027b5d + 2f37867 commit db87ef0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 76 deletions.
24 changes: 24 additions & 0 deletions docker/test/common-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '2.1'

services:
ganache:
image: trufflesuite/ganache-cli
command: ganache-cli --gasLimit 90000000000 --gasPrice 1 -a 10 -m "vanish junk genuine web seminar cook absurd royal ability series taste method identify elevator liquid"
ports:
- 8545:8545

signer-node:
image: orbs:signer
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config

orbs-chain-node:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
sysctls:
net.core.somaxconn: 25000
115 changes: 39 additions & 76 deletions docker/test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,187 +2,150 @@ version: '2.1'

services:
ganache:
image: trufflesuite/ganache-cli
command: ganache-cli --gasLimit 90000000000 --gasPrice 1 -a 10 -m "vanish junk genuine web seminar cook absurd royal ability series taste method identify elevator liquid"
ports:
- 8545:8545
extends:
file: common-services.yml
service: ganache
networks:
orbs-network:
ipv4_address: 192.168.199.6

signer-node-1:
image: orbs:signer
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
extends:
file: common-services.yml
service: signer-node
command: /opt/orbs/orbs-signer --listen :7777 --config /opt/orbs/config/node1.json --config /opt/orbs/config/node1.keys.json
networks:
orbs-network:
ipv4_address: 192.168.199.9

signer-node-2:
image: orbs:signer
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
extends:
file: common-services.yml
service: signer-node
command: /opt/orbs/orbs-signer --listen :7777 --config /opt/orbs/config/node2.json --config /opt/orbs/config/node2.keys.json
networks:
orbs-network:
ipv4_address: 192.168.199.10

signer-node-3:
image: orbs:signer
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
extends:
file: common-services.yml
service: signer-node
command: /opt/orbs/orbs-signer --listen :7777 --config /opt/orbs/config/node3.json --config /opt/orbs/config/node3.keys.json
networks:
orbs-network:
ipv4_address: 192.168.199.11

signer-node-4:
image: orbs:signer
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
extends:
file: common-services.yml
service: signer-node
command: /opt/orbs/orbs-signer --listen :7777 --config /opt/orbs/config/node4.json --config /opt/orbs/config/node4.keys.json
networks:
orbs-network:
ipv4_address: 192.168.199.12


orbs-app-chain-node-1:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8080:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node1/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node1.json --log /opt/orbs/logs/node1.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.2

orbs-app-chain-node-2:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8081:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node2/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node2.json --log /opt/orbs/logs/node2.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.3

orbs-app-chain-node-3:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8082:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node3/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node3.json --log /opt/orbs/logs/node3.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.4

orbs-app-chain-node-4:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8083:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node4/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node4.json --log /opt/orbs/logs/node4.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.5

orbs-mgmt-chain-node-1:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8084:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node1-mgmt/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node1-mgmt.json --log /opt/orbs/logs/node1-mgmt.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.22

orbs-mgmt-chain-node-2:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8085:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node2-mgmt/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node2-mgmt.json --log /opt/orbs/logs/node2-mgmt.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.23

orbs-mgmt-chain-node-3:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8086:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node3-mgmt/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node3-mgmt.json --log /opt/orbs/logs/node3-mgmt.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.24

orbs-mgmt-chain-node-4:
image: orbs:export
environment:
ETHEREUM_ENDPOINT: http://ganache:8545/
extends:
file: common-services.yml
service: orbs-chain-node
ports:
- 8087:8080
volumes:
- ../../_logs/:/opt/orbs/logs
- ./$CONSENSUSALGO-config/:/opt/orbs/config
- ../../_tmp/blocks/node4-mgmt/:/usr/local/var/orbs/
command: /opt/orbs/orbs-node --silent --config /opt/orbs/config/node4-mgmt.json --log /opt/orbs/logs/node4-mgmt.log
sysctls:
net.core.somaxconn: 25000
networks:
orbs-network:
ipv4_address: 192.168.199.25
Expand Down

0 comments on commit db87ef0

Please sign in to comment.