Skip to content

Commit 3557e60

Browse files
committed
一键部署,区块链网络
1 parent 6bc227b commit 3557e60

37 files changed

+1732
-21
lines changed

Dockerfile

100644100755
+1-7
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@ FROM golang:1.14
33
ENV GO111MODULE=on
44
ENV GOPROXY=https://goproxy.cn,direct
55

6-
RUN mkdir -p /root/blockchain-real-estate
76
RUN apt update \
87
&& apt-get -y install nodejs npm
98

109
COPY application /root/blockchain-real-estate/application
11-
COPY deploy/crypto-config /root/blockchain-real-estate/crypto-config
1210

1311
WORKDIR /root/blockchain-real-estate/application/vue
1412
RUN npm config set registry "https://registry.npm.taobao.org/" \
1513
&& npm i node-sass --sass_binary_site="https://npm.taobao.org/mirrors/node-sass/" \
1614
&& npm install
1715
RUN npm run build:prod
18-
RUN mv ./dist ../
1916

2017
WORKDIR /root/blockchain-real-estate/application
21-
RUN go build -o "app" .
22-
23-
EXPOSE 8000
24-
ENTRYPOINT ["./app"]
18+
RUN go build -o "app" .

LICENSE

100644100755
File mode changed.

README.md

100644100755
File mode changed.

application/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
app
2+
dist

application/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 应用和前端

application/conf/config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client:
1111

1212
# MSP证书的根路径
1313
cryptoconfig:
14-
path: /blockchain-real-estate/crypto-config
14+
path: ./../../deploy/crypto-config
1515

1616
# 默认即可,以下都是可选(optional)的配置
1717
credentialStore:

chaincode/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 链码(智能合约)

chaincode/blockchain-real-estate/go.mod

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@ module github.com/togettoyou/blockchain-real-estate/chaincode/blockchain-real-es
33
go 1.14
44

55
require (
6+
github.com/Knetic/govaluate v3.0.0+incompatible // indirect
7+
github.com/Shopify/sarama v1.28.0 // indirect
68
github.com/fsouza/go-dockerclient v1.7.2 // indirect
79
github.com/golang/protobuf v1.5.2 // indirect
810
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
11+
github.com/hashicorp/go-version v1.3.0 // indirect
912
github.com/hyperledger/fabric v1.4.7
1013
github.com/hyperledger/fabric-amcl v0.0.0-20210319225857-000ace5745f9 // indirect
1114
github.com/miekg/pkcs11 v1.0.3 // indirect
15+
github.com/onsi/ginkgo v1.16.1 // indirect
16+
github.com/onsi/gomega v1.11.0 // indirect
1217
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
1318
github.com/spf13/viper v1.7.1 // indirect
1419
github.com/sykesm/zap-logfmt v0.0.4 // indirect
1520
go.uber.org/zap v1.16.0 // indirect
1621
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
1722
golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6 // indirect
1823
google.golang.org/grpc v1.37.0 // indirect
19-
gopkg.in/yaml.v2 v2.4.0 // indirect
2024
)

chaincode/blockchain-real-estate/go.sum

-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX
1717
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
1818
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
1919
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
20-
github.com/Knetic/govaluate v1.5.0 h1:L4MyqdJSld9xr2eZcZHCWLfeIX2SBjqrwIKG1pcm/+4=
2120
github.com/Knetic/govaluate v3.0.0+incompatible h1:7o6+MAPhYTCF0+fdvoz1xDedhRb4f6s9Tn1Tt7/WTEg=
2221
github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
2322
github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
@@ -97,7 +96,6 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8
9796
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
9897
github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY=
9998
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
100-
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
10199
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
102100
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
103101
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
@@ -198,9 +196,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J
198196
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
199197
github.com/hyperledger/fabric v1.4.7 h1:weX0z8WybFIj2TTF0QOa+vBxwxBRZToRms3E1wtfRZk=
200198
github.com/hyperledger/fabric v1.4.7/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0=
201-
github.com/hyperledger/fabric v1.4.12 h1:xk/ykUNIq4wjWfKI7S4XVGhseg3ku4BYsabjrFKYu6k=
202-
github.com/hyperledger/fabric v2.1.1+incompatible h1:cYYRv3vVg4kA6DmrixLxwn1nwBEUuYda8DsMwlaMKbY=
203-
github.com/hyperledger/fabric v2.1.1+incompatible/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0=
204199
github.com/hyperledger/fabric-amcl v0.0.0-20210319225857-000ace5745f9 h1:7VhA8O2oo05PAKWDBVJ+n9d52l4nRvBeLnfetCqkrMI=
205200
github.com/hyperledger/fabric-amcl v0.0.0-20210319225857-000ace5745f9/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE=
206201
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
@@ -254,8 +249,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
254249
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
255250
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
256251
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
257-
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
258-
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
259252
github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
260253
github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
261254
github.com/moby/sys/mountinfo v0.4.0 h1:1KInV3Huv18akCu58V7lzNlt+jFmqlu1EaErnEHE/VM=

deploy/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/config/
2+
/crypto-config/

deploy/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 区块链网络
2+
3+
## fabric
4+
fabric和fabric-ca

0 commit comments

Comments
 (0)