github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-supply-chain-master/docker-compose-installed.yaml (about)

     1  # Copyright 2017 Intel Corporation
     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  
    16  version: '2.1'
    17  
    18  services:
    19  
    20    processor:
    21      image: supply-tp-installed:${ISOLATION_ID}
    22      container_name: supply-tp-installed
    23      build:
    24        context: .
    25        dockerfile: processor/Dockerfile-installed
    26        args:
    27          - http_proxy
    28          - https_proxy
    29          - no_proxy
    30      depends_on:
    31        - validator
    32      entrypoint: supply-chain-tp -C tcp://validator:4004
    33  
    34    server:
    35      image: supply-server-installed:${ISOLATION_ID}
    36      container_name: supply-server-installed
    37      build:
    38        context: .
    39        dockerfile: server/Dockerfile-installed
    40        args:
    41          - http_proxy
    42          - https_proxy
    43          - no_proxy
    44      expose:
    45        - 3000
    46      ports:
    47        - '8020:3000'
    48      depends_on:
    49        - validator
    50        - rethink
    51      environment:
    52        - VALIDATOR_URL=tcp://validator:4004
    53        - DB_HOST=rethink
    54      command: |
    55        bash -c "
    56          set -x &&
    57          npm run init &&
    58          node index.js
    59        "
    60  
    61    ledger-sync:
    62      image: supply-ledger-sync-installed:${ISOLATION_ID}
    63      container_name: supply-ledger-sync-installed
    64      build:
    65        context: .
    66        dockerfile: ledger_sync/Dockerfile-installed
    67      depends_on:
    68        - validator
    69        - rethink
    70      environment:
    71        - VALIDATOR_URL=tcp://validator:4004
    72        - DB_HOST=rethink
    73  
    74    asset-client:
    75      image: supply-asset-client-installed:${ISOLATION_ID}
    76      container_name: supply-asset-client-installed
    77      build:
    78        context: .
    79        dockerfile: asset_client/Dockerfile-installed
    80      expose:
    81        - 80
    82      ports:
    83        - '8021:80'
    84      depends_on:
    85        - server
    86  
    87    fish-client:
    88      image: supply-fish-client-installed:${ISOLATION_ID}
    89      container_name: supply-fish-client-installed
    90      build:
    91        context: .
    92        dockerfile: fish_client/Dockerfile-installed
    93      expose:
    94        - 80
    95      ports:
    96        - '8022:80'
    97      depends_on:
    98        - server
    99  
   100    rethink:
   101      image: rethinkdb
   102      container_name: supply-rethink
   103      expose:
   104        - 8080
   105        - 28015
   106  
   107    validator:
   108      image: hyperledger/sawtooth-validator:1.0
   109      container_name: supply-validator
   110      expose:
   111        - 4004
   112      # start the validator with an empty genesis batch
   113      entrypoint: |
   114        bash -c "
   115          if [ ! -f /etc/sawtooth/keys/validator.priv ]; then
   116            sawadm keygen &&
   117            sawtooth keygen my_key &&
   118            sawset genesis -k /root/.sawtooth/keys/my_key.priv &&
   119            sawadm genesis config-genesis.batch
   120          fi;
   121          sawtooth-validator -v \
   122            --endpoint tcp://validator:8800 \
   123            --bind component:tcp://eth0:4004 \
   124            --bind network:tcp://eth0:8800
   125        "
   126  
   127    settings-tp:
   128      image: hyperledger/sawtooth-settings-tp:1.0
   129      container_name: supply-settings-tp
   130      depends_on:
   131        - validator
   132      entrypoint: settings-tp -v -C tcp://validator:4004