Skip to content

Commit

Permalink
sandbox mode: use stable tag and always pull images
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Feb 25, 2021
1 parent 34e3a75 commit 31832ee
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 24 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,16 @@ ps:
docker ps --format "table {{.Names}}\t{{.RunningFor}}\t{{.Status}}\t{{.Ports}}"

sandbox-images:
docker-compose -f docker-compose.sandbox.yml build
$(MAKE) stable-images

sandbox:
TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2) COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.sandbox.yml up -d

sandbox-up:
COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.sandbox.yml up -d
TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2) COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.sandbox.yml up -d elastic mq db api indexer metrics gui

sandbox-dev:
COMPOSE_PROJECT_NAME=bcdbox BCD_ENV=you docker-compose -f docker-compose.sandbox.yml up -d elastic mq db api indexer metrics
TAG=$$(cat version.json | grep version | awk -F\" '{ print $$4 }' | cut -d '.' -f1-2) COMPOSE_PROJECT_NAME=bcdbox BCD_ENV=you docker-compose -f docker-compose.sandbox.yml up -d elastic mq db api indexer metrics gui

sandbox-down:
COMPOSE_PROJECT_NAME=bcdbox docker-compose -f docker-compose.sandbox.yml down
Expand Down
2 changes: 1 addition & 1 deletion configs/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ share_path: ${HOME}/.bcd
base_url: http://localhost:8080

ipfs:
- https://ipfs.baking-bad.org
- https://ipfs.io
- https://dweb.link
- https://ipfs.baking-bad.org

domains:
delphinet: KT1CR6vXJ1qeY4ALDQfUaLFi3FcJJZ8WDygo
Expand Down
2 changes: 1 addition & 1 deletion configs/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ share_path: /etc/bcd
base_url: https://better-call.dev

ipfs:
- https://ipfs.baking-bad.org
- https://ipfs.io
- https://dweb.link
- https://ipfs.baking-bad.org

domains:
delphinet: KT1CR6vXJ1qeY4ALDQfUaLFi3FcJJZ8WDygo
Expand Down
5 changes: 2 additions & 3 deletions configs/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ share_path: ${HOME}/.bcd
base_url: http://localhost:8000

ipfs:
- https://ipfs.io
- https://dweb.link
- ${SANDBOX_IPFS_GATEWAY}

api:
project_name: api
bind: ":14000"
swagger_host: "localhost:8000"
cors_enabled: false
cors_enabled: true
oauth_enabled: false
sentry_enabled: false
seed_enabled: true
Expand Down
2 changes: 1 addition & 1 deletion configs/you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ share_path: /etc/bcd
base_url: https://you.better-call.dev

ipfs:
- https://ipfs.baking-bad.org
- https://ipfs.io
- https://dweb.link
- https://ipfs.baking-bad.org

domains:
delphinet: KT1CR6vXJ1qeY4ALDQfUaLFi3FcJJZ8WDygo
Expand Down
23 changes: 8 additions & 15 deletions docker-compose.sandbox.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: bakingbad/bcdhub-elastic:${TAG}
restart: always
volumes:
- esdata:/usr/share/elasticsearch/data
Expand Down Expand Up @@ -37,10 +37,7 @@ services:

api:
restart: always
image: bakingbad/bcdhub-api:${TAG:-latest}
build:
context: .
dockerfile: build/api/Dockerfile
image: bakingbad/bcdhub-api:${TAG}
environment:
- BCD_ENV=${BCD_ENV:-sandbox}
- GIN_MODE=debug
Expand All @@ -50,6 +47,7 @@ services:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
- SANDBOX_NODE_URI=http://sandbox:8732
- SANDBOX_IPFS_GATEWAY=https://ipfs.io
depends_on:
- elastic
- db
Expand All @@ -62,15 +60,13 @@ services:

indexer:
restart: always
image: bakingbad/bcdhub-indexer:${TAG:-latest}
build:
context: .
dockerfile: build/indexer/Dockerfile
image: bakingbad/bcdhub-indexer:${TAG}
environment:
- BCD_ENV=${BCD_ENV:-sandbox}
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
- SANDBOX_NODE_URI=http://sandbox:8732
- SANDBOX_IPFS_GATEWAY=https://ipfs.io
depends_on:
- elastic
- mq
Expand All @@ -81,10 +77,7 @@ services:

metrics:
restart: always
image: bakingbad/bcdhub-metrics:${TAG:-latest}
build:
context: .
dockerfile: build/metrics/Dockerfile
image: bakingbad/bcdhub-metrics:${TAG}
environment:
- BCD_ENV=${BCD_ENV:-sandbox}
- POSTGRES_USER=root
Expand All @@ -93,6 +86,7 @@ services:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
- SANDBOX_NODE_URI=http://sandbox:8732
- SANDBOX_IPFS_GATEWAY=https://ipfs.io
depends_on:
- elastic
- mq
Expand Down Expand Up @@ -128,8 +122,7 @@ services:
gui:
container_name: sandbox-gui
restart: always
image: bakingbad/bcdhub-gui:${TAG:-latest}
entrypoint: /bin/bash
image: bakingbad/bcdhub-gui:${TAG}
depends_on:
- api
ports:
Expand Down

0 comments on commit 31832ee

Please sign in to comment.