add ocean-contracts compose file.

This commit is contained in:
ssallam 2020-09-09 18:25:24 +02:00
parent 09c97c7d21
commit 99640d206e
5 changed files with 50 additions and 6 deletions

View File

@ -7,6 +7,8 @@ services:
networks:
backend:
ipv4_address: 172.15.0.5
depends_on:
- ocean-contracts
environment:
DB_MODULE: ${DB_MODULE}
DB_HOSTNAME: ${DB_HOSTNAME}
@ -18,3 +20,5 @@ services:
DB_CA_CERTS: ${DB_CA_CERTS}
DB_CLIENT_KEY: ${DB_CLIENT_KEY}
DB_CLIENT_CERT: ${DB_CLIENT_CERT}
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/

View File

@ -19,6 +19,7 @@ services:
ipv4_address: 172.15.0.5
depends_on:
- elasticsearch
- ocean-contracts
environment:
DB_MODULE: ${DB_MODULE}
DB_HOSTNAME: ${DB_HOSTNAME}
@ -36,3 +37,5 @@ services:
EVENTS_RPC: "http://172.15.0.3:8545"
EVENTS_ALLOW: "0"
RUN_EVENTS_MONITOR: "1"
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/

View File

@ -0,0 +1,24 @@
version: '3'
services:
ocean-contracts:
image: oceanprotocol/ocean-contracts:$CONTRACTS_VERSION
networks:
backend:
ipv4_address: 172.15.0.14
environment:
MNEMONIC: ${GANACHE_MNEMONIC}
OWNER_ROLE_ADDRESS: ${CONTRACTS_OWNER_ROLE_ADDRESS}
DEPLOY_CONTRACTS: ${CONTRACTS_DEPLOY_CONTRACTS}
LOCAL_CONTRACTS: ${CONTRACTS_DEPLOY_CONTRACTS}
REUSE_DATABASE: ${GANACHE_REUSE_DATABASE}
DATABASE_PATH: "/ganache-db"
NETWORK_NAME: ${CONTRACTS_NETWORK_NAME}
CONTRACTS_RPC_HOST: ${NETWORK_RPC_HOST}
CONTRACTS_RPC_PORT: ${NETWORK_RPC_PORT}
CONTRACTS_RPC_URL: ${NETWORK_RPC_URL}
LOCAL_USER_ID: ${LOCAL_USER_ID}
LOCAL_GROUP_ID: ${LOCAL_GROUP_ID}
depends_on:
- ganache
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/

View File

@ -7,6 +7,8 @@ services:
networks:
backend:
ipv4_address: 172.15.0.4
depends_on:
- ocean-contracts
environment:
ARTIFACTS_PATH: ${OCEAN_ARTIFACTS_FOLDER:-/ocean-provider/artifacts}
NETWORK_URL: ${NETWORK_RPC_URL}
@ -21,3 +23,5 @@ services:
IPFS_GATEWAY: ${PROVIDER_IPFS_GATEWAY}
OCEAN_PROVIDER_TIMEOUT: '9000'
OPERATOR_SERVICE_URL: ${OPERATOR_SERVICE_URL}
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/

View File

@ -33,6 +33,10 @@ export PROVIDER_VERSION=${PROVIDER_VERSION:-latest}
export PROJECT_NAME="ocean"
export FORCEPULL="false"
# Export User UID and GID
export LOCAL_USER_ID=$(id -u)
export LOCAL_GROUP_ID=$(id -g)
# Specify the ethereum default RPC container provider
if [ ${IP} = "localhost" ]; then
@ -42,9 +46,16 @@ else
fi
export NETWORK_RPC_PORT="8545"
export NETWORK_RPC_URL="http://"${NETWORK_RPC_HOST}:${NETWORK_RPC_PORT}
# Use this seed only on Spree! (Spree is the default.)
# Use this seed on ganache to always create the same wallets
export GANACHE_MNEMONIC=${GANACHE_MNEMONIC:-"taxi music thumb unique chat sand crew more leg another off lamp"}
# Ocean contracts
export OCEAN_HOME="${HOME}/.ocean"
export CONTRACTS_OWNER_ROLE_ADDRESS="${CONTRACTS_OWNER_ROLE_ADDRESS}"
export CONTRACTS_DEPLOY_CONTRACTS="true"
export OCEAN_ARTIFACTS_FOLDER="${OCEAN_HOME}/ocean-contracts/artifacts"
# Specify which ethereum client to run or connect to: development
export CONTRACTS_NETWORK_NAME="ganache"
# Default Aquarius parameters: use Elasticsearch
export DB_MODULE="elasticsearch"
@ -81,11 +92,6 @@ fi
export OPERATOR_SERVICE_URL=https://operator-api.operator.dev-ocean.com
# Export User UID and GID
export LOCAL_USER_ID=$(id -u)
export LOCAL_GROUP_ID=$(id -g)
#add aquarius to /etc/hosts
if [ ${IP} = "localhost" ]; then
@ -150,6 +156,8 @@ COMPOSE_FILES+=" -f ${COMPOSE_DIR}/dashboard.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_elasticsearch.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/provider.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ganache.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ocean_contracts.yml"
DOCKER_COMPOSE_EXTRA_OPTS="${DOCKER_COMPOSE_EXTRA_OPTS:-}"
while :; do
@ -176,6 +184,7 @@ while :; do
;;
--no-ganache)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/ganache.yml/}"
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/ocean_contracts.yml/}"
printf $COLOR_Y'Starting without Ganache...\n\n'$COLOR_RESET
;;
--no-aquarius)