Skip to content

Commit

Permalink
Sandbox ready (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus authored May 1, 2020
1 parent d6674b2 commit 0a6c062
Show file tree
Hide file tree
Showing 47 changed files with 803 additions and 778 deletions.
4 changes: 0 additions & 4 deletions .env

This file was deleted.

4 changes: 4 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=development
VUE_APP_API_URI=http://localhost:14000/v1/
VUE_APP_OAUTH_ENABLED=true
VUE_APP_GA_ENABLED=false
3 changes: 0 additions & 3 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
NODE_ENV=production
VUE_APP_API_URL=https://api.better-call.dev
VUE_APP_NODE_RPC=https://rpc.tzkt.io
VUE_APP_PRIVATE=0
5 changes: 2 additions & 3 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
NODE_ENV=development
VUE_APP_API_URL=https://api.better-call.dev
VUE_APP_NODE_RPC=https://rpc.tzkt.io
VUE_APP_PRIVATE=1
VUE_APP_OAUTH_ENABLED=true
VUE_APP_GA_ENABLED=false
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM node:latest AS base
FROM node:latest AS build
WORKDIR /better-call-dev
ADD . .
RUN npm i
RUN npm run build
COPY . .
RUN npm i && npm run build


FROM nginx:latest AS release
COPY --from=base /better-call-dev/dist /usr/share/nginx/html/
COPY default.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html/
COPY --from=build /better-call-dev/dist ./
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
debug:
stage:
npm run serve -- --mode staging

deploy-prod:
Expand All @@ -16,3 +16,9 @@ deploy-test:
nginx -s reload
rm -rf dist
rm -f bcd.tar.gz

latest:
git tag latest -f && git push origin latest -f

image:
docker build -t bakingbad/bcdhub-gui:latest .
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Better Call Dev 2 [Beta]
# Better Call Dev 2
[![Build Status](https://travis-ci.org/baking-bad/bcd.svg?branch=master)](https://travis-ci.org/baking-bad/bcd)
[![Docker Build Status](https://img.shields.io/docker/cloud/build/bakingbad/bcdhub-gui)](https://hub.docker.com/r/bakingbad/bcdhub-gui)
[![Made With: Vue.js](https://img.shields.io/badge/vue-2.6.10-green.svg?)](https://vuejs.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A successor of the Tezos contract explorer, now basing on its own indexer.
A successor of the Tezos contract explorer, now basing on its own indexer. Also known as BCD2, BCDHub.

## Run locally
## Installation
Requires Node.js 11.4+

```bash
Expand All @@ -14,16 +15,27 @@ cd bcd
npm i
```

#### Staging mode
If no local instance of the bcdhub indexer
```bash
make
### Development mode
Requires https://github.com/baking-bad/bcdhub.git running on `localhost:14000`
```
npm run serve
```

#### Development mode
### Staging mode
Connects to the public API instance `api.better-call.dev`
```
npm run serve
make
```

### Publications
* Evolution of the Better Call Dev explorer
https://medium.com/coinmonks/bcd2-tezos-smart-contracts-hub-85f6102fc2f9
* An overview of the renewed Tezos contract explorer
https://medium.com/coinmonks/better-call-dev-2-whats-new-587e94111a6e

#### Demo
* TezTalks Live #1
https://www.youtube.com/watch?v=if_Vr46x3lk

## Sponsored by
[Tezos Foundation](https://tezos.foundation/)
10 changes: 10 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;

location / {
try_files $uri /index.html;
}
}
10 changes: 10 additions & 0 deletions public/config.box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"API_URI": "http://localhost:14000/v1/",
"NETWORKS": ["sandboxnet"],
"OAUTH_ENABLED": false,
"GA_ENABLED": false,
"HOME_PAGE": "projects",
"RPC_ENDPOINTS": {
"sandboxnet": "http://localhost:8732"
}
}
19 changes: 19 additions & 0 deletions public/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"API_URI": "https://api.better-call.dev/v1/",
"NETWORKS": ["mainnet", "carthagenet", "zeronet", "babylonnet"],
"OAUTH_ENABLED": false,
"GA_ENABLED": true,
"HOME_PAGE": "home",
"RPC_ENDPOINTS": {
"mainnet": "https://rpc.tzkt.io/mainnet",
"carthagenet": "https://rpc.tzkt.io/carthagenet",
"zeronet": "https://rpc.tzkt.io/zeronet",
"babylonnet": "https://rpc.tzkt.io/babylonnet"
},
"TZKT_ENDPOINTS": {
"mainnet": "https://tzkt.io/",
"carthagenet": "https://carthage.tzkt.io/",
"zeronet": "https://zeronet.tzkt.io/",
"babylonnet": "https://babylon.tzkt.io/"
}
}
2 changes: 0 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ import ErrorSnackbar from "@/components/ErrorSnackbar.vue";
export default {
name: "App",
components: {
ErrorSnackbar
},
data: () => ({
showToTop: false
}),
Expand Down
Loading

0 comments on commit 0a6c062

Please sign in to comment.