diff --git a/docker-compose-local-parity-node.yml b/docker-compose-local-parity-node.yml new file mode 100644 index 0000000..a85d25c --- /dev/null +++ b/docker-compose-local-parity-node.yml @@ -0,0 +1,72 @@ +version: '2.1' + +# Run: docker-compose --project-name=ocean up + +services: + mongodb: + image: mongo:3.6 + ports: + - "27017:27017" + command: mongod + networks: + - backend + + parity-node: + image: parity/parity:stable + command: + --config /parity/config/validator.toml + --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e + --jsonrpc-interface 0.0.0.0 + --ws-interface 0.0.0.0 + --ui-interface 0.0.0.0 + --unsafe-expose + --jsonrpc-cors all + --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e + volumes: + - ./parity/parity/config:/parity/config:ro + - parity-node:/root/.local/share/io.parity.ethereum/ + - ./parity/parity/authorities/validator0.json:/root/.local/share/io.parity.ethereum/keys/ocean-network/validator.json:ro + - ./parity/parity/keys:/root/.local/share/io.parity.ethereum/keys/ocean-network + - ./parity/parity/authorities/validator0.pwd:/parity/validator.pwd:ro + - ./parity/parity/node0.network.key:/root/.local/share/io.parity.ethereum/network/key:ro + ports: + - 8545:8545 + networks: + - backend + + keeper-contracts: + image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} + networks: + - backend + 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 + + provider: + image: oceanprotocol/provider:${OCEAN_VERSION:-stable} + ports: + - 5000:5000 + networks: + - backend + depends_on: + - keeper-contracts + environment: + KEEPER_HOST: http://parity-node + DB_HOSTNAME: mongodb + LOCAL_CONTRACTS: 'true' + volumes: + - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro + + +networks: + backend: + +volumes: + parity-node: diff --git a/docker-compose-no-pleuston.yml b/docker-compose-no-pleuston.yml new file mode 100644 index 0000000..af469b0 --- /dev/null +++ b/docker-compose-no-pleuston.yml @@ -0,0 +1,48 @@ +version: '2.1' + +# Run: docker-compose --project-name=ocean up + +services: + mongodb: + image: mongo:3.6 + ports: + - "27017:27017" + command: mongod + networks: + - backend + + keeper-contracts: + image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} + ports: + - 8545:8545 + networks: + - backend + environment: + LOCAL_CONTRACTS: "true" + DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} + DATABASE_PATH: "/ganache-db" + REUSE_DATABASE: ${REUSE_DATABASE} + NETWORK_NAME: ${KEEPER_NETWORK_NAME} + volumes: + - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ + - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db + + provider: + image: oceanprotocol/provider:${OCEAN_VERSION:-stable} + ports: + - 5000:5000 + networks: + - backend + depends_on: + - keeper-contracts + environment: + KEEPER_HOST: http://keeper-contracts + DB_HOSTNAME: mongodb + LOCAL_CONTRACTS: "true" + volumes: + - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro + +networks: + backend: + + diff --git a/docker-compose.yml b/docker-compose.yml index 9618be0..d005c61 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,9 +18,14 @@ services: networks: - backend environment: - LOCAL_CONTRACTS: 'true' + LOCAL_CONTRACTS: "true" + DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} + DATABASE_PATH: "/ganache-db" + REUSE_DATABASE: ${REUSE_DATABASE} + NETWORK_NAME: ${KEEPER_NETWORK_NAME} volumes: - - artifacts:/keeper-contracts/artifacts/ + - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ + - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db provider: image: oceanprotocol/provider:${OCEAN_VERSION:-stable} @@ -33,9 +38,9 @@ services: environment: KEEPER_HOST: http://keeper-contracts DB_HOSTNAME: mongodb - LOCAL_CONTRACTS: 'true' + LOCAL_CONTRACTS: "true" volumes: - - artifacts:/usr/local/keeper-contracts/:ro + - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro pleuston: image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable} @@ -48,10 +53,9 @@ services: OCEAN_HOST: provider LOCAL_CONTRACTS: 'true' volumes: - - artifacts:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro + - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro networks: backend: -volumes: - artifacts: + diff --git a/start_ocean.sh b/start_ocean.sh new file mode 100644 index 0000000..9a13558 --- /dev/null +++ b/start_ocean.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +export OCEAN_VERSION=latest +# 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" +# Ganache specific option, these two options have no effect when not running ganache-cli +export GANACHE_DATABASE_PATH="." +export REUSE_DATABASE="true" +# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local +export KEEPER_NETWORK_NAME="ganache" +export ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts + +docker-compose up \ No newline at end of file diff --git a/start_ocean_local_parity_node.sh b/start_ocean_local_parity_node.sh new file mode 100755 index 0000000..c0ea712 --- /dev/null +++ b/start_ocean_local_parity_node.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +export OCEAN_VERSION=latest +# 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" +# Ganache specific option, these two options have no effect when not running ganache-cli +export GANACHE_DATABASE_PATH="." +export REUSE_DATABASE="true" +# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local +export KEEPER_NETWORK_NAME="ocean_poa_net_local" +export ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts + +docker-compose -f docker-compose-local-parity-node.yml up \ No newline at end of file diff --git a/start_ocean_no_pleuston.sh b/start_ocean_no_pleuston.sh new file mode 100755 index 0000000..2428da7 --- /dev/null +++ b/start_ocean_no_pleuston.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +export OCEAN_VERSION=latest +# 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" +# Ganache specific option, these two options have no effect when not running ganache-cli +export GANACHE_DATABASE_PATH="." +export REUSE_DATABASE="true" +# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local +export KEEPER_NETWORK_NAME="ganache" +export ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts + +docker-compose -f docker-compose-no-pleuston.yml up \ No newline at end of file