From b300440165a77c47e8de2fb26b526b51d644542a Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sat, 28 Nov 2020 18:13:24 +0200 Subject: [PATCH] Remove services with dependencies from docker compose --- docker/Makefile | 22 ++++++++++---------- docker/docker-compose.yml | 43 +++------------------------------------ 2 files changed, 14 insertions(+), 51 deletions(-) diff --git a/docker/Makefile b/docker/Makefile index 955cc71..add9205 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,4 +1,4 @@ -# Targets for building/running/stopping both apps (uses the docker-compose file) +# Targets for building/running/stopping the blockchain and rendezvous server (using the docker-compose file) build: @docker-compose -f ./docker-compose.yml -p concordia build; run: @@ -8,6 +8,16 @@ stop: stop-clean-data: @docker-compose -f ./docker-compose.yml -p concordia down -v +# Ganache targets +build-ganache: + @docker build . -f ./ganache/Dockerfile -t concordia-ganache +run-ganache: + @docker-compose -f ./ganache/docker-compose.yml -p concordia up -d + +# Rendezvous targets +run-rendezvous: + @docker-compose -f ./rendezvous/docker-compose.yml -p concordia up -d + # Contracts targets build-contracts: @docker build ../ -f ./concordia-contracts/Dockerfile --target compile -t concordia-contracts --build-arg TZ=Europe/Athens @@ -43,16 +53,6 @@ run-app: run-app-host-chain: @docker run -d --env-file=./env/concordia.env --name concordia-app --net=host concordia-app:latest -# Ganache targets -build-ganache: - @docker build . -f ./ganache/Dockerfile -t concordia-ganache -run-ganache: - @docker-compose -f ./ganache/docker-compose.yml -p concordia up -d - -# Rendezvous targets -run-rendezvous: - @docker-compose -f ./rendezvous/docker-compose.yml -p concordia up -d - # Other clean-images: @docker rmi `docker images -q -f "dangling=true"` diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 12305c3..a7044bb 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,17 +10,14 @@ services: - 8545:8545 user: root volumes: - - ./volumes/ganache_db:/home/ganache_db - - ./volumes/ganache_keys:/home/ganache_keys + - ./ganache/volumes/ganache_db:/home/ganache_db + - ./ganache/volumes/ganache_keys:/home/ganache_keys networks: ganache-network: restart: always - # Simple rendezvous server image - # Reference: - # https://hub.docker.com/r/libp2p/websocket-star-rendezvous rendezvous: - image: libp2p/websocket-star-rendezvous:release + image: libp2p/js-libp2p-webrtc-star:version-0.20.1 container_name: rendezvous networks: rendezvous-network: @@ -28,40 +25,6 @@ services: - 9090:9090 restart: always - concordia-contracts: - build: - dockerfile: ./docker/concordia-contracts/Dockerfile - context: ./.. - args: - TZ: Europe/Athens - container_name: concordia-contracts-migrate - env_file: - - ./env/contracts.docker.env - volumes: - - ../packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ - depends_on: - - ganache - networks: - ganache-network: - - concordia-app: - build: - dockerfile: ./docker/concordia-app/Dockerfile - context: ./.. - args: - TZ: Europe/Athens - container_name: concordia-app - depends_on: - - concordia-contracts - - rendezvous - env_file: - - ./env/concordia.docker.env - networks: - ganache-network: - ports: - - 8473:80 - restart: always - networks: ganache-network: rendezvous-network: