Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit b2ac8e8

Browse files
author
xiaoxm1026
authored
Merge pull request #52 from irisnet/develop
Release/v0.2.0
2 parents 35ce9ef + 2f78ac9 commit b2ac8e8

File tree

159 files changed

+12744
-11772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+12744
-11772
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
vendor
3+
build

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/watcherTasks.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM node:10 as builder
2+
WORKDIR /app
3+
COPY ./frontend/ /app
4+
5+
ENV VUE_APP_FAUCET_URL https://testnet.irisplorer.io/api/faucet
6+
ENV VUE_APP_FUXI fuxi-1002
7+
8+
RUN npm i yarn -g && yarn install && VUE_APP_FAUCET_URL=$VUE_APP_FAUCET_URL VUE_APP_FUXI=$VUE_APP_FUXI yarn build
9+
10+
FROM golang:1.10.3-alpine3.7 as go-builder
11+
ENV GOPATH /root/go
12+
ENV REPO_PATH $GOPATH/src/github.com/irisnet/explorer/server
13+
ENV PATH $GOPATH/bin:$PATH
14+
15+
RUN mkdir -p GOPATH REPO_PATH
16+
17+
COPY ./server/ $REPO_PATH
18+
WORKDIR $REPO_PATH
19+
20+
RUN apk add --no-cache make git && go get github.com/golang/dep/cmd/dep && dep ensure && make build
21+
22+
23+
FROM alpine:3.7
24+
WORKDIR /app/server
25+
COPY --from=builder /app/dist/ /app/frontend/dist
26+
COPY --from=go-builder /root/go/src/github.com/irisnet/explorer/server/build/ /app/server/
27+
CMD ['./irisplorer']

Dockerfile-dev

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM node:10 as builder
2+
WORKDIR /app
3+
COPY ./frontend/ /app
4+
5+
ENV VUE_APP_FAUCET_URL http://dev.faucet.irisplorer.io
6+
ENV VUE_APP_FUXI fuxi-1002
7+
8+
RUN rm -rf yarn.lock && npm i yarn -g && yarn install && VUE_APP_FAUCET_URL=$VUE_APP_FAUCET_URL VUE_APP_FUXI=$VUE_APP_FUXI yarn build
9+
10+
FROM golang:1.10.3-alpine3.7 as go-builder
11+
ENV GOPATH /root/go
12+
ENV REPO_PATH $GOPATH/src/github.com/irisnet/explorer/server
13+
ENV PATH $GOPATH/bin:$PATH
14+
15+
RUN mkdir -p GOPATH REPO_PATH
16+
17+
COPY ./server/ $REPO_PATH
18+
WORKDIR $REPO_PATH
19+
20+
RUN apk add --no-cache make git && go get github.com/golang/dep/cmd/dep && dep ensure && make build
21+
22+
23+
FROM alpine:3.7
24+
WORKDIR /app/server
25+
COPY --from=builder /app/dist/ /app/frontend/dist
26+
COPY --from=go-builder /root/go/src/github.com/irisnet/explorer/server/build/ /app/server/
27+
CMD ['./irisplorer']

Dockerfile-qa

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM node:10 as builder
2+
WORKDIR /app
3+
COPY ./frontend/ /app
4+
5+
ENV VUE_APP_FAUCET_URL http://47.104.155.125:30200
6+
ENV VUE_APP_FUXI fuxi-1002
7+
8+
RUN npm i yarn -g && yarn install && VUE_APP_FAUCET_URL=$VUE_APP_FAUCET_URL VUE_APP_FUXI=$VUE_APP_FUXI yarn build
9+
10+
FROM golang:1.10.3-alpine3.7 as go-builder
11+
ENV GOPATH /root/go
12+
ENV REPO_PATH $GOPATH/src/github.com/irisnet/explorer/server
13+
ENV PATH $GOPATH/bin:$PATH
14+
15+
RUN mkdir -p GOPATH REPO_PATH
16+
17+
COPY ./server/ $REPO_PATH
18+
WORKDIR $REPO_PATH
19+
20+
RUN apk add --no-cache make git && go get github.com/golang/dep/cmd/dep && dep ensure && make build
21+
22+
23+
FROM alpine:3.7
24+
WORKDIR /app/server
25+
COPY --from=builder /app/dist/ /app/frontend/dist
26+
COPY --from=go-builder /root/go/src/github.com/irisnet/explorer/server/build/ /app/server/
27+
CMD ['./irisplorer']

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
# explorer
22
Blockchain explorer for the IRIS network
3+
4+
5+
# ENV
6+
DB_URL: mongo url ( eg. 192.168.150.7:27017)
7+
8+
DB_DATABASE: mongo database name ( eg. sync-iris )
9+
10+
DB_USER: mongo user ( eg. iris )
11+
12+
DB_PASSWORD: mongo password ( eg. irispassword )
13+
14+
# Docker Run
15+
docker run -p 8080:8080 -e ${ENV Variables} explorer

frontend/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

frontend/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/
2+
node_modules/
3+
dist/

frontend/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:10 as builder
2+
WORKDIR /app
3+
COPY . /app
4+
RUN npm i yarn -g && yarn install && yarn build
5+
6+
FROM nginx:1.15-alpine
7+
COPY --from=builder /app/dist/ /usr/share/nginx/html/

0 commit comments

Comments
 (0)