github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-supply-chain-master/integration/sawtooth_integration/docker/test_supply_chain_rust.yaml (about) 1 # Copyright 2017 Intel Corporation 2 # Copyright 2018 Cargill Incorporated 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # ------------------------------------------------------------------------------ 16 17 version: "2.1" 18 19 services: 20 21 shell: 22 image: supply-shell 23 container_name: supply-shell-test 24 build: 25 context: ../../../ 26 dockerfile: shell/Dockerfile 27 volumes: 28 - ../../../:/sawtooth-supply-chain 29 - /sawtooth-supply-chain/server/node_modules 30 depends_on: 31 - rethink 32 - rest-api 33 environment: 34 - VALIDATOR_URL=tcp://validator:4004 35 - DB_HOST=rethink 36 - SERVER=http://supply-server:3000 37 command: | 38 bash -c " 39 protogen && 40 if [ ! -f /root/.sawtooth/keys/root.priv ]; then 41 sawtooth keygen && 42 cd server/ && 43 npm run init && 44 cd - 45 fi; 46 tail -f /dev/null 47 " 48 49 supply-chain-tp: 50 image: supply-tp:$ISOLATION_ID 51 volumes: 52 - ../../../:/sawtooth-supply-chain/ 53 - /sawtooth-supply-chain/processor/target 54 - /sawtooth-supply-chain/processor/src/messages 55 expose: 56 - 4004 57 build: 58 context: ../../../processor/ 59 stop_signal: SIGKILL 60 entrypoint: | 61 bash -c " 62 cargo build && 63 supply-chain-tp -v -C tcp://validator:4004 64 " 65 66 rethink: 67 image: rethinkdb 68 expose: 69 - 8080 70 - 28015 71 72 settings-tp: 73 image: hyperledger/sawtooth-tp_settings:latest 74 container_name: supply-settings-tp-test 75 expose: 76 - 4004 77 depends_on: 78 - validator 79 entrypoint: settings-tp -vv -C tcp://validator:4004 80 81 validator: 82 image: hyperledger/sawtooth-validator:latest 83 container_name: supply-validator-test 84 expose: 85 - 4004 86 # start the validator with an empty genesis batch 87 command: "bash -c \"\ 88 sawadm keygen && \ 89 sawset genesis \ 90 -k /etc/sawtooth/keys/validator.priv \ 91 -o config-genesis.batch && \ 92 sawadm genesis config-genesis.batch && \ 93 sawadm genesis && \ 94 sawtooth-validator -v \ 95 --endpoint tcp://validator:8800 \ 96 --bind component:tcp://eth0:4004 \ 97 --bind network:tcp://eth0:8800 \ 98 \"" 99 stop_signal: SIGKILL 100 101 rest-api: 102 image: hyperledger/sawtooth-rest_api:latest 103 container_name: supply-rest-api-test 104 expose: 105 - 4004 106 - 8008 107 depends_on: 108 - validator 109 entrypoint: sawtooth-rest-api --connect tcp://validator:4004 --bind rest-api:8008 -vv 110 111 supply-server: 112 image: supply-server 113 container_name: supply-server-test 114 build: 115 context: ../../../ 116 dockerfile: server/Dockerfile 117 args: 118 - http_proxy 119 - https_proxy 120 - no_proxy 121 volumes: 122 - ../../../:/sawtooth-supply-chain 123 - /sawtooth-supply-chain/server/node_modules 124 expose: 125 - 8080 126 - 3000 127 depends_on: 128 - rethink 129 - validator 130 environment: 131 - VALIDATOR_URL=tcp://validator:4004 132 - DB_HOST=rethink 133 entrypoint: node index.js 134 135 ledger-sync: 136 image: supply-ledger-sync 137 container_name: supply-ledger-sync-test 138 build: 139 context: ../../../ 140 dockerfile: ledger_sync/Dockerfile 141 volumes: 142 - ../../../:/sawtooth-supply-chain 143 - /sawtooth-supply-chain/ledger_sync/node_modules 144 depends_on: 145 - validator 146 - rethink 147 environment: 148 - VALIDATOR_URL=tcp://validator:4004 149 - DB_HOST=rethink 150 151 test-supply-chain-rust: 152 image: supply-chain-dev-python:$ISOLATION_ID 153 build: 154 context: ../../../ 155 dockerfile: docker/supply-chain-dev-python 156 volumes: 157 - ../../../:/sawtooth-supply-chain 158 expose: 159 - 8080 160 - 8081 161 depends_on: 162 - supply-server 163 command: | 164 bash -c " 165 echo 'Waiting 60s to being testing . . .' && 166 sleep 60 && 167 nose2-3 -vvv \ 168 -c /sawtooth-supply-chain/nose2.cfg \ 169 -s /sawtooth-supply-chain/integration/sawtooth_integration/tests \ 170 test_supply_chain.TestSupplyChain --log-capture 171 " 172 stop_signal: SIGKILL 173 environment: 174 PYTHONPATH: 175 "/sawtooth-supply-chain/processor:\ 176 /sawtooth-supply-chain/tests:\ 177 /sawtooth-supply-chain/integration"