github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docker/compose/sawtooth-debug.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    sawtooth-shell:
    20      build:
    21        context: ../..
    22        dockerfile: docker/sawtooth-debug-python
    23      volumes:
    24        - ../../:/project/sawtooth-core
    25      image: debug-sawtooth-python
    26      container_name: debug-sawtooth-shell
    27      cap_add:
    28        - SYS_PTRACE
    29      entrypoint: |
    30        bash -c "
    31          sed -i 's|#!/usr/bin/env python3|#!/usr/bin/env python3-dbg|' \
    32            bin/sawtooth-validator &&
    33          sed -i 's|#!/usr/bin/env python3|#!/usr/bin/env python3-dbg|' \
    34            bin/sawtooth-rest-api &&
    35          sed -i 's|#!/usr/bin/env python3|#!/usr/bin/env python3-dbg|' \
    36            bin/sawtooth &&
    37          tail -f /dev/null
    38        "
    39  
    40    validator:
    41      build:
    42        context: ../..
    43        dockerfile: docker/sawtooth-debug-python
    44      volumes:
    45        - ../../:/project/sawtooth-core
    46      image: debug-sawtooth-python
    47      container_name: debug-validator
    48      cap_add:
    49        - SYS_PTRACE
    50      expose:
    51        - 4004
    52        - 8800
    53      ports:
    54        - "4050:4004"
    55      command: |
    56        bash -c "
    57          sleep 3 &&
    58          if [ ! -f /etc/sawtooth/keys/validator.priv ]; then
    59          sawadm keygen &&
    60          sawtooth keygen my_key &&
    61          sawset genesis -k /root/.sawtooth/keys/my_key.priv &&
    62          sawadm genesis config-genesis.batch
    63          fi;
    64          sawtooth-validator -vv \
    65            --endpoint tcp://validator:8800 \
    66            --bind component:tcp://eth0:4004 \
    67            --bind network:tcp://eth0:8800
    68        "
    69  
    70    settings-tp:
    71      build:
    72        context: ../..
    73        dockerfile: docker/sawtooth-debug-python
    74      volumes:
    75        - ../../:/project/sawtooth-core
    76      image: debug-sawtooth-python
    77      container_name: debug-settings-tp
    78      cap_add:
    79        - SYS_PTRACE
    80      depends_on:
    81        - validator
    82      command: settings-tp -vv -C tcp://validator:4004
    83  
    84    intkey-tp-python:
    85      build:
    86        context: ../..
    87        dockerfile: docker/sawtooth-debug-python
    88      volumes:
    89        - ../../:/project/sawtooth-core
    90      image: debug-sawtooth-python
    91      container_name: debug-intkey-tp-python
    92      cap_add:
    93        - SYS_PTRACE
    94      depends_on:
    95        - validator
    96      command: intkey-tp-python -vv -C tcp://validator:4004
    97  
    98    rest-api:
    99      build:
   100        context: ../..
   101        dockerfile: docker/sawtooth-debug-python
   102      volumes:
   103        - ../../:/project/sawtooth-core
   104      image: debug-sawtooth-python
   105      container_name: debug-rest-api
   106      cap_add:
   107        - SYS_PTRACE
   108      depends_on:
   109        - validator
   110      ports:
   111        - "8008:8008"
   112      command: sawtooth-rest-api -v --connect tcp://validator:4004 --bind rest-api:8008