Browse Source

Fix ganache and rendezvous docker configurations

develop
Apostolos Fanakis 4 years ago
parent
commit
ac909f5b4c
  1. 1
      .gitignore
  2. 20
      docker/Makefile
  3. 5
      docker/ganache/docker-compose.yml
  4. 5
      docker/rendezvous/docker-compose.yml

1
.gitignore

@ -21,6 +21,7 @@ yarn-error.log*
# Docker volumes # Docker volumes
docker/volumes docker/volumes
docker/ganache/volumes
docker/reports docker/reports
docker/env/concordia.env docker/env/concordia.env
docker/env/contracts.env docker/env/contracts.env

20
docker/Makefile

@ -16,12 +16,12 @@ build-contracts-migrate:
build-contracts-tests: build-contracts-tests:
@docker build ../ -f ./concordia-contracts/Dockerfile --target test -t concordia-contracts-tests --build-arg TZ=Europe/Athens @docker build ../ -f ./concordia-contracts/Dockerfile --target test -t concordia-contracts-tests --build-arg TZ=Europe/Athens
run-contract-tests: run-contract-tests:
@docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env concordia-contracts-tests:latest @docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_ganache-network concordia-contracts-tests:latest
run-contract-tests-host-chain: run-contract-tests-host-chain:
@docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=host concordia-contracts-tests:latest @docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=host concordia-contracts-tests:latest
run-contracts-migrate: run-contracts-migrate:
@cd .. &&\ @cd .. &&\
docker run --rm -v `pwd`/packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./docker/env/contracts.env concordia-contracts-migrate:latest docker run --rm -v `pwd`/packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./docker/env/contracts.env --net=concordia_ganache-network concordia-contracts-migrate:latest
run-contracts-migrate-host-chain: run-contracts-migrate-host-chain:
@cd .. &&\ @cd .. &&\
docker run --rm -v `pwd`/packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./docker/env/contracts.env --net=host concordia-contracts-migrate:latest docker run --rm -v `pwd`/packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./docker/env/contracts.env --net=host concordia-contracts-migrate:latest
@ -37,10 +37,24 @@ build-app-tests:
run-app-tests: run-app-tests:
@docker run --rm -v `pwd`/reports/app/:/usr/test-reports/ --env-file=./env/concordia.env concordia-app-tests:latest @docker run --rm -v `pwd`/reports/app/:/usr/test-reports/ --env-file=./env/concordia.env concordia-app-tests:latest
run-app: run-app:
@docker run -d --env-file=./env/concordia.env -p 8473:80 --name concordia-app concordia-app:latest @docker create --env-file=./env/concordia.env -p 8473:80 --name concordia-app --net=concordia_ganache-network concordia-app:latest &&\
docker network connect concordia_rendezvous-network concordia-app &&\
docker start concordia-app
run-app-host-chain: run-app-host-chain:
@docker run -d --env-file=./env/concordia.env --name concordia-app --net=host concordia-app:latest @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
build-rendezvous:
@docker build -f ./rendezvous/Dockerfile -t concordia-rendezvous
run-rendezvous:
@docker-compose -f ./rendezvous/docker-compose.yml -p concordia up -d
# Other # Other
clean-images: clean-images:
@docker rmi `docker images -q -f "dangling=true"` @docker rmi `docker images -q -f "dangling=true"`

5
docker/ganache/docker-compose.yml

@ -11,3 +11,8 @@ services:
volumes: volumes:
- ./volumes/ganache_db:/home/ganache_db - ./volumes/ganache_db:/home/ganache_db
- ./volumes/ganache_keys:/home/ganache_keys - ./volumes/ganache_keys:/home/ganache_keys
networks:
ganache-network:
networks:
ganache-network:

5
docker/rendezvous/docker-compose.yml

@ -7,3 +7,8 @@ services:
restart: always restart: always
ports: ports:
- "9090:9090" - "9090:9090"
networks:
rendezvous-network:
networks:
rendezvous-network:

Loading…
Cancel
Save