Skip to content

Commit

Permalink
Fix sandbox setup
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Jan 27, 2022
1 parent 4333263 commit 4c9dcbc
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 259 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,23 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-metrics.outputs.tags }}
labels: ${{ steps.meta-metrics.outputs.labels }}
labels: ${{ steps.meta-metrics.outputs.labels }}

# Sandbox GUI

- name: GUI image tags & labels
id: meta-gui
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-gui

- name: Metrics image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/sandbox/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-gui.outputs.tags }}
labels: ${{ steps.meta-gui.outputs.labels }}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,6 @@ gateway-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
37 changes: 0 additions & 37 deletions build/graphql/Dockerfile

This file was deleted.

14 changes: 14 additions & 0 deletions build/sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:latest AS build

RUN git clone https://github.com/baking-bad/bcd.git /bcd

WORKDIR /bcd
RUN yarn

COPY .env.production .
RUN yarn build

FROM nginx:latest AS release
COPY default.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html/
COPY --from=build /bcd/dist ./
10 changes: 10 additions & 0 deletions build/sandbox/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;
}
}
7 changes: 0 additions & 7 deletions build/sandbox/jupyter/Dockerfile

This file was deleted.

93 changes: 0 additions & 93 deletions build/sandbox/jupyter/notebooks/michelson_quickstart.ipynb

This file was deleted.

117 changes: 0 additions & 117 deletions build/sandbox/jupyter/notebooks/pytezos_quickstart.ipynb

This file was deleted.

2 changes: 1 addition & 1 deletion configs/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ api:
mempool_enabled: false
sandbox_mode: true
rpc:
sandboxnet: ${SANDBOX_NODE_URI}
sandboxnet: "localhost:20000"
seed:
user:
login: sandboxuser
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.flextesa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ services:
environment:
- block_time=4
ports:
- "20000:20000"
- 127.0.0.1:20000:20000
expose:
- 20000/tcp
logging: *bcd-logging

gui:
container_name: sandbox-gui
restart: always
image: bakingbad/bcdhub-gui:4.0
image: ghcr.io/baking-bad/bcdhub-gui:${TAG}
depends_on:
- api
ports:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ services:
gui:
container_name: sandbox-gui
restart: always
image: bakingbad/bcdhub-gui:4.0
image: ghcr.io/baking-bad/bcdhub-gui:${TAG}
depends_on:
- api
ports:
Expand Down

0 comments on commit 4c9dcbc

Please sign in to comment.