github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docker-compose.yaml (about) 1 # Copyright 2018 Cargill Incorporated 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 version: '3.6' 16 17 services: 18 19 settings-tp: 20 build: 21 context: . 22 dockerfile: families/settings/Dockerfile 23 image: sawtooth-settings-tp-local:${ISOLATION_ID} 24 volumes: 25 - ./:/project/sawtooth-core 26 container_name: sawtooth-settings-tp-local 27 depends_on: 28 - validator 29 command: | 30 bash -c " 31 bin/protogen 32 cd families/settings 33 python3 setup.py clean --all 34 python3 setup.py build 35 settings-tp -vv -C tcp://validator:4004 36 " 37 stop_signal: SIGKILL 38 39 40 intkey-tp-python: 41 build: 42 context: . 43 dockerfile: sdk/examples/intkey_python/Dockerfile 44 image: intkey-tp-python-local:${ISOLATION_ID} 45 volumes: 46 - ./:/project/sawtooth-core 47 container_name: intkey-tp-python-local 48 depends_on: 49 - validator 50 command: | 51 bash -c " 52 bin/protogen 53 cd sdk/examples/intkey_python 54 python3 setup.py clean --all 55 python3 setup.py build 56 intkey-tp-python -vv -C tcp://validator:4004 57 " 58 stop_signal: SIGKILL 59 60 61 xo-tp-python: 62 build: 63 context: . 64 dockerfile: sdk/examples/xo_python/Dockerfile 65 image: xo-tp-python-local:${ISOLATION_ID} 66 volumes: 67 - ./:/project/sawtooth-core 68 container_name: xo-tp-python-local 69 depends_on: 70 - validator 71 command: | 72 bash -c " 73 bin/protogen 74 cd sdk/examples/xo_python 75 python3 setup.py clean --all 76 python3 setup.py build 77 xo-tp-python -vv -C tcp://validator:4004 78 " 79 stop_signal: SIGKILL 80 81 82 client: 83 build: 84 context: . 85 dockerfile: docker/sawtooth-shell 86 image: sawtooth-shell-local:${ISOLATION_ID} 87 volumes: 88 - ./:/project/sawtooth-core 89 container_name: sawtooth-shell-local 90 depends_on: 91 - validator 92 command: | 93 bash -c " 94 sawtooth keygen && 95 tail -f /dev/null 96 " 97 stop_signal: SIGKILL 98 99 100 validator: 101 build: 102 context: . 103 dockerfile: validator/Dockerfile 104 image: sawtooth-validator-local:${ISOLATION_ID} 105 volumes: 106 - ./:/project/sawtooth-core 107 container_name: sawtooth-validator-local 108 expose: 109 - 4004 110 - 8800 111 - 5050 112 ports: 113 - "4004:4004" 114 # start the validator with an empty genesis batch 115 command: | 116 bash -c " 117 bin/protogen 118 cd validator 119 python3 setup.py clean --all 120 python3 setup.py build 121 mkdir -p bin 122 mkdir -p lib 123 cargo build --release 124 cp ./target/release/sawtooth-validator bin/sawtooth-validator 125 cp ./target/release/libsawtooth_validator.so lib/libsawtooth_validator.so 126 sawadm keygen 127 sawadm genesis 128 sawtooth-validator -vv \ 129 --endpoint tcp://validator:8800 \ 130 --bind component:tcp://eth0:4004 \ 131 --bind network:tcp://eth0:8800 \ 132 --bind consensus:tcp://eth0:5050 \ 133 " 134 stop_signal: SIGKILL 135 136 137 rest-api: 138 build: 139 context: . 140 dockerfile: rest_api/Dockerfile 141 image: sawtooth-rest-api-local:${ISOLATION_ID} 142 volumes: 143 - ./:/project/sawtooth-core 144 container_name: sawtooth-rest-api-local 145 ports: 146 - "8008:8008" 147 depends_on: 148 - validator 149 command: | 150 bash -c " 151 bin/protogen 152 cd rest_api 153 python3 setup.py clean --all 154 python3 setup.py build 155 sawtooth-rest-api -v --connect tcp://validator:4004 --bind rest-api:8008 156 " 157 stop_signal: SIGKILL 158 159 160 devmode-rust: 161 build: 162 context: . 163 dockerfile: sdk/examples/devmode_rust/Dockerfile 164 image: sawtooth-devmode-rust-local:${ISOLATION_ID} 165 volumes: 166 - ./:/project/sawtooth-core 167 container_name: sawtooth-devmode-rust-local 168 depends_on: 169 - validator 170 command: | 171 bash -c " 172 cd sdk/examples/devmode_rust 173 cargo build --release 174 mkdir -p bin 175 cp ./target/release/devmode-rust bin/devmode-rust 176 devmode-rust -v --connect tcp://validator:5050 177 " 178 stop_signal: SIGKILL