docker-compose-files/hyperledger_fabric/v1.3.0/ca-test/docker-compose.yaml

58 lines
2.4 KiB
YAML
Raw Normal View History

2018-10-11 13:53:01 +08:00
version: '2'
services:
ca.org1.example.com:
image: yeasy/hyperledger-fabric-ca
container_name: ca.org1.example.com
hostname: ca.org1.example.com
#environment:
#- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server/org1.example.com/ca
#- FABRIC_CA_SERVER_CSR_CN=ca.org1.example.com
# CA cannot support following fields as env variables now
# - FABRIC_CA_SERVER_CSR_NAMES_L="San Francisco"
# - FABRIC_CA_SERVER_CSR_NAMES_O=org1.example.com
volumes:
- $PWD/scripts:/scripts
- $PWD/crypto-config/peerOrganizations/org1.example.com/:/etc/hyperledger/fabric-ca-server
working_dir: /scripts
command: sh -c "sleep 1; bash ca_server_start.sh org1.example.com ca"
#command: fabric-ca-server start -b admin:adminpw
#--csr.names C=US,ST="California",L="San Francisco",O="org1.example.com"
depends_on:
- tlsca.org1.example.com
tlsca.org1.example.com:
image: yeasy/hyperledger-fabric-ca
container_name: tlsca.org1.example.com
hostname: tlsca.org1.example.com
#environment:
#- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server/org1.example.com/tlsca
#- FABRIC_CA_SERVER_CSR_CN=tlsca.org1.example.com
# CA cannot support following fields as env variables now
# - FABRIC_CA_SERVER_CSR_NAMES_L="San Francisco"
# - FABRIC_CA_SERVER_CSR_NAMES_O=org1.example.com
volumes:
- $PWD/scripts:/scripts
- $PWD/crypto-config/peerOrganizations/org1.example.com/:/etc/hyperledger/fabric-ca-server
working_dir: /scripts
command: sh -c "bash ca_server_start.sh org1.example.com tlsca"
#command: fabric-ca-server start -b admin:adminpw
#--csr.names C=US,ST="California",L="San Francisco",O="org1.example.com"
ca-client:
image: yeasy/hyperledger-fabric-ca
container_name: ca-client
hostname: ca-client
#environment:
# - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-client
volumes:
- $PWD/scripts:/scripts
- $PWD/crypto-config:/etc/hyperledger/fabric-ca-client
working_dir: /scripts
depends_on:
- ca.org1.example.com
- tlsca.org1.example.com
#command: sh -c "while true; do sleep 1; done"
command: sh -c "sleep 2; bash client-test.sh"