---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: chaincode-rest-deployment
spec:
  selector:
    matchLabels:
      app: chaincode-rest
  replicas: 1
  template:
    metadata:
      labels:
        app: chaincode-rest
    spec:
      volumes:
      - name: sharedvolume
        persistentVolumeClaim:
          claimName: common-pvc
      containers:
      - name: chaincode-rest
        image: lgsvlfx/data-marketplace-chaincode-rest:dev
        imagePullPolicy: Always
        env:
        - name: PORT
          value: "9090"
        - name: TZ
          value: "America/Los_Angeles"
        - name: CORE_PEER_ADDRESSAUTODETECT
          value: "true"
        - name: CORE_PEER_NETWORKID
          value: nid1
        - name: CORE_PEER_ID
          value: org1peer1
        - name: CORE_PEER_ADDRESS
          value: blockchain-org1peer1:30110
        - name: CORE_PEER_LISTENADDRESS
          value: 0.0.0.0:30110
        - name: CORE_PEER_EVENTS_ADDRESS
          value: 0.0.0.0:30111
        - name: CORE_PEER_GOSSIP_BOOTSTRAP
          value: blockchain-org1peer1:30110
        - name: CORE_PEER_GOSSIP_ENDPOINT
          value: blockchain-org1peer1:30110
        - name: CORE_PEER_GOSSIP_EXTERNALENDPOINT
          value: blockchain-org1peer1:30110
        - name: CORE_PEER_LOCALMSPID
          value: Org1MSP
        - name: CORE_PEER_MSPCONFIGPATH
          value: /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/
        - name: ORDERER_URL
          value: blockchain-orderer:31010
        - name: GODEBUG
        ports:
        - containerPort: 9090
        volumeMounts:
        - mountPath: /shared
          name: sharedvolume
