1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-11-22 09:47:04 +01:00

Added individual compose files

This commit is contained in:
Javier Cortejoso 2018-11-29 12:32:38 +01:00
parent baab74af40
commit 565fe241c9
No known key found for this signature in database
GPG Key ID: FBEEF3131E39EBCF
9 changed files with 177 additions and 12 deletions

View File

@ -0,0 +1,17 @@
version: '2.1'
services:
aquarius:
image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable}
ports:
- 5000:5000
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- keeper-contracts
environment:
KEEPER_HOST: http://parity-node
DB_HOSTNAME: mongodb
LOCAL_CONTRACTS: 'true'
volumes:
- ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro

19
compose-files/brizo.yml Normal file
View File

@ -0,0 +1,19 @@
version: '2.1'
services:
brizo:
image: oceanprotocol/brizo:${OCEAN_VERSION:-stable}
ports:
- 8030:8030
networks:
backend:
ipv4_address: 172.15.0.17
depends_on:
- keeper-contracts
- parity-node
environment:
KEEPER_URL: http://parity-node:8545
LOCAL_CONTRACTS: "true"
KEEPER_NETWORK_NAME: ${KEEPER_NETWORK_NAME}
AQUARIUS_URL: http://aquarius:5000
volumes:
- ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro

View File

@ -0,0 +1,17 @@
version: '2.1'
services:
keeper-contracts:
image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable}
networks:
backend:
ipv4_address: 172.15.0.14
environment:
LOCAL_CONTRACTS: "true"
DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS}
DATABASE_PATH: "/ganache-db"
REUSE_DATABASE: ${REUSE_DATABASE}
NETWORK_NAME: ${KEEPER_NETWORK_NAME}
POA_HOST: "parity-node"
volumes:
- ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/
- ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db

10
compose-files/mongo.yml Normal file
View File

@ -0,0 +1,10 @@
version: '2.1'
services:
mongodb:
image: mongo:3.6
ports:
- "27017:27017"
command: mongod
networks:
backend:
ipv4_address: 172.15.0.11

View File

@ -0,0 +1,14 @@
version: '2.1'
networks:
backend:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.15.0.1/24
gateway: 172.15.0.1
volumes:
parity-node:
secret-store:

View File

@ -0,0 +1,30 @@
version: '2.1'
services:
parity-node:
image: oceanprotocol/parity-ethereum:beta
entrypoint: /opt/parity/parity
command:
--config /home/parity/parity/config/secretstoreclient.toml
--db-path /home/parity/chains
--keys-path /home/parity/.local/share/io.parity.ethereum/keys
--base-path /home/parity/base
--engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e
--ws-interface all
--jsonrpc-cors all
--jsonrpc-interface all
--jsonrpc-hosts all
--jsonrpc-apis all
--unsafe-expose
--unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e
volumes:
- ../parity/parity/config:/home/parity/parity/config
- parity-node:/home/parity/.local/share/io.parity.ethereum/
- ../parity/parity/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network/validator.json
- ../parity/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network
- ../parity/parity/authorities/validator0.pwd:/home/parity/parity/validator.pwd
- ../parity/parity/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key
ports:
- 8545:8545
networks:
backend:
ipv4_address: 172.15.0.12

View File

@ -0,0 +1,17 @@
version: '2.1'
services:
pleuston:
image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable}
networks:
backend:
ipv4_address: 172.15.0.18
ports:
- 3000:3000
depends_on:
- keeper-contracts
environment:
KEEPER_HOST: keeper-contracts
OCEAN_HOST: aquarius
LOCAL_CONTRACTS: 'true'
volumes:
- ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro

View File

@ -0,0 +1,31 @@
version: '2.1'
services:
secret-store:
image: oceanprotocol/parity-ethereum:master
# entrypoint: tail -f /dev/null
entrypoint: /opt/parity/parity
command:
--config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all
volumes:
- ../parity/secret_store/config/:/etc/parity/secretstore/
- secret-store:/parity_data/
- ../parity/secret_store/keys/:/parity_data/keys/ocean-network/
ports:
- 12000:12000
- 12001
networks:
backend:
ipv4_address: 172.15.0.13
secret-store-cors-proxy:
image: nginx:alpine
volumes:
- ../cors-proxy.conf:/etc/nginx/nginx.conf:ro
depends_on:
- secret-store
ports:
- 12001:12001
networks:
backend:
ipv4_address: 172.15.0.16
command: nginx -g 'daemon off;'

View File

@ -1,13 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
COMPOSE_DIR="${DIR}/compose-files"
# Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run. # Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run.
export DEPLOY_CONTRACTS="true" export DEPLOY_CONTRACTS="true"
# Ganache specific option, these two options have no effect when not running ganache-cli # Ganache specific option, these two options have no effect when not running ganache-cli
export GANACHE_DATABASE_PATH="." export GANACHE_DATABASE_PATH="${DIR}"
export REUSE_DATABASE="false" export REUSE_DATABASE="false"
# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local # Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local
export KEEPER_NETWORK_NAME="ganache" export KEEPER_NETWORK_NAME="ganache"
export ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts export ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts
# colors # colors
COLOR_R="\033[0;31m" # red COLOR_R="\033[0;31m" # red
@ -30,7 +32,14 @@ show_banner
# default to stable versions # default to stable versions
export OCEAN_VERSION=stable export OCEAN_VERSION=stable
COMPOSE_FILE='docker-compose.yml'
COMPOSE_FILES=""
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongo.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml"
while :; do while :; do
case $1 in case $1 in
@ -43,25 +52,26 @@ while :; do
printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET
;; ;;
--no-pleuston) --no-pleuston)
COMPOSE_FILE='docker-compose-no-pleuston.yml' COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/}
printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET
;; ;;
--local-parity-node) --local-parity-node)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/parity_client.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml"
export KEEPER_NETWORK_NAME="ocean_poa_net_local" export KEEPER_NETWORK_NAME="ocean_poa_net_local"
COMPOSE_FILE='docker-compose-local-parity-node.yml'
printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET
;; ;;
--) # End of all options. --) # End of all options.
shift shift
break break
;; ;;
-?*) -?*)
printf $COLOR_R'WARN: Unknown option (ignored): %s\n'$COLOR_RESET "$1" >&2 printf $COLOR_R'WARN: Unknown option (ignored): %s\n'$COLOR_RESET "$1" >&2
break break
;; ;;
*) *)
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
docker-compose --project-name=ocean -f $COMPOSE_FILE up docker-compose --project-name=ocean $COMPOSE_FILES up
break break
esac esac
shift shift