Skip to content

Commit

Permalink
Update readme and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Feb 1, 2022
1 parent 2299cfa commit 23b3ef9
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 163 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ jobs:
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-gui

- name: Metrics image build & push
- name: GUI image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/sandbox/Dockerfile
build-args: |
TAG=4.1.0
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ jobs:
run: |
go mod download
go test ./...
- name: docker-compose test build
run: |
touch .env
docker-compose build
security:
name: Security Analyze
runs-on: ubuntu-latest
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/tests_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ jobs:
run: |
go mod download
go test ./...
- name: docker-compose test build
run: |
touch .env
docker-compose -f docker-compose.yml -f build/api/ci/docker-compose.yml build
security:
name: Security Analyze
runs-on: ubuntu-latest
Expand Down
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,23 @@ db-restore:
ps:
docker ps --format "table {{.Names}}\t{{.RunningFor}}\t{{.Status}}\t{{.Ports}}"

sandbox:
COMPOSE_PROJECT_NAME=bcdbox TAG=master docker-compose -f docker-compose.sandbox.yml up -d
sandbox-pull:
TAG=4.1.0 docker-compose -f docker-compose.flextesa.yml pull

flextesa-sandbox:
COMPOSE_PROJECT_NAME=bcdbox TAG=master docker-compose -f docker-compose.flextesa.yml up -d
COMPOSE_PROJECT_NAME=bcdbox TAG=4.1.0 docker-compose -f docker-compose.flextesa.yml up -d

sandbox-down:
COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.sandbox.yml down
COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.flextesa.yml down

sandbox-clear:
COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.flextesa.yml down -v

gateway:
COMPOSE_PROJECT_NAME=bcdhub TAG=master docker-compose -f docker-compose.gateway.yml up -d
COMPOSE_PROJECT_NAME=bcdhub TAG=4.1.0 docker-compose -f docker-compose.gateway.yml up -d

gateway-down:
COMPOSE_PROJECT_NAME=bcdhub docker-compose -f docker-compose.gateway.yml down

gateway-clear:
COMPOSE_PROJECT_NAME=bcdhub docker-compose -f docker-compose.gateway.yml down -v

sandbox-image:
docker build -t ghcr.io/baking-bad/bcdhub-gui:master ./build/sandbox
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@ make gateway-clear

### Sandbox

Make sure your Tezos node is exposed at `0.0.0.0:8732`
```
make sandbox-images
make sandbox
```

Sandbox UI is now available at http://localhost:8000
The simplest way is just to copy the `docker-compose.flexesa.yml` to your project.

You can also use a builtin Flextesa instance instead (will be exposed at 8732):
Make sure you have the latest images and run the compose:
```
make sandbox-pull
make flextesa-sandbox
```
Sandbox UI is now available at http://localhost:8000


In order to stop or reset sandbox:
```
Expand Down
2 changes: 1 addition & 1 deletion build/elastic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.1
FROM docker.elastic.co/elasticsearch/elasticsearch:7.10.2
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch repository-s3
COPY --chown=elasticsearch:elasticsearch build/elastic/elasticsearch.yml /usr/share/elasticsearch/config/
3 changes: 2 additions & 1 deletion build/sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:14 AS build

RUN git clone https://github.com/baking-bad/bcd.git /bcd
ARG TAG
RUN git clone --depth=1 --branch ${TAG} https://github.com/baking-bad/bcd.git /bcd

WORKDIR /bcd
RUN yarn
Expand Down
101 changes: 0 additions & 101 deletions docker-compose.sandbox.yml

This file was deleted.

40 changes: 5 additions & 35 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.6"
services:
elastic:
image: bakingbad/bcdhub-elastic:${TAG:-latest}
image: ghcr.io/baking-bad/bcdhub-elastic:${TAG:-master}
build:
context: .
dockerfile: build/elastic/Dockerfile
Expand All @@ -21,7 +21,7 @@ services:
max-file: "5"

db:
image: bakingbad/bcdhub-db:${TAG:-latest}
image: ghcr.io/baking-bad/bcdhub-db:${TAG:-master}
shm_size: 1g
user: postgres
build:
Expand All @@ -43,7 +43,7 @@ services:

api:
restart: always
image: bakingbad/bcdhub-api:${TAG:-latest}
image: ghcr.io/baking-bad/bcdhub-api:${TAG:-master}
build:
context: .
dockerfile: build/api/Dockerfile
Expand All @@ -60,7 +60,7 @@ services:

indexer:
restart: always
image: bakingbad/bcdhub-indexer:${TAG:-latest}
image: ghcr.io/baking-bad/bcdhub-indexer:${TAG:-master}
build:
context: .
dockerfile: build/indexer/Dockerfile
Expand All @@ -75,7 +75,7 @@ services:

metrics:
restart: always
image: bakingbad/bcdhub-metrics:${TAG:-latest}
image: ghcr.io/baking-bad/bcdhub-metrics:${TAG:-master}
build:
context: .
dockerfile: build/metrics/Dockerfile
Expand All @@ -88,36 +88,6 @@ services:
- ${SHARE_PATH}:/etc/bcd
logging: *bcd-logging

gui:
restart: always
image: bakingbad/bcdhub-gui:${TAG:-latest}
entrypoint: /bin/bash
command: >-
-c "(cp /etc/bcd/nginx/default.${BCD_ENV:-production}.conf /etc/nginx/conf.d/default.conf || true)
&& (cp /etc/bcd/nginx/sitemap.${BCD_ENV:-production}.xml /usr/share/nginx/html/sitemap.xml || true)
&& nginx -g 'daemon off;'"
ports:
- 127.0.0.1:${BCD_GUI_PORT}:80
volumes:
- ${SHARE_PATH}:/etc/bcd
logging: *bcd-logging

# graphql:
# restart: always
# image: bakingbad/bcdhub-graphql:${TAG:-latest}
# build:
# context: .
# dockerfile: build/graphql/Dockerfile
# env_file:
# - .env
# depends_on:
# - db
# ports:
# - 127.0.0.1:3000:3000
# volumes:
# - ${SHARE_PATH}:/etc/bcd
# logging: *bcd-logging

volumes:
esdata:
db:
Expand Down

0 comments on commit 23b3ef9

Please sign in to comment.