Browse Source

Fix general docker-compose.yml, Add env configurations for docker runs

develop
Apostolos Fanakis 4 years ago
parent
commit
50003452b3
  1. 4
      docker/Makefile
  2. 12
      docker/docker-compose.yml
  3. 3
      docker/env/concordia.docker.env
  4. 4
      docker/env/contracts.docker.env

4
docker/Makefile

@ -21,7 +21,7 @@ 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
run-contracts-migrate:
@cd .. &&\
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
docker run --rm -v `pwd`/packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./docker/env/contracts.docker.env --net=concordia_ganache-network concordia-contracts-migrate:latest
run-contracts-migrate-host-chain:
@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
@ -37,7 +37,7 @@ build-app-tests:
run-app-tests:
@docker run --rm -v `pwd`/reports/app/:/usr/test-reports/ --env-file=./env/concordia.env concordia-app-tests:latest
run-app:
@docker create --env-file=./env/concordia.env -p 8473:80 --name concordia-app --net=concordia_ganache-network concordia-app:latest &&\
@docker create --env-file=./env/concordia.docker.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:

12
docker/docker-compose.yml

@ -34,10 +34,11 @@ services:
context: ./..
args:
TZ: Europe/Athens
SKIP_TESTS: "true"
container_name: concordia-contracts
container_name: concordia-contracts-migrate
env_file:
- ./env/contracts.env
- ./env/contracts.docker.env
volumes:
- ../packages/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/
depends_on:
- ganache
networks:
@ -49,17 +50,16 @@ services:
context: ./..
args:
TZ: Europe/Athens
SKIP_TESTS: "true"
container_name: concordia-app
depends_on:
- concordia-contracts
- rendezvous
env_file:
- ./env/concordia.env
- ./env/concordia.docker.env
networks:
ganache-network:
ports:
- 3000:80
- 8473:80
restart: always
networks:

3
docker/env/concordia.docker.env

@ -0,0 +1,3 @@
# Variables needed in runtime (in browser)
REACT_APP_RENDEZVOUS_HOST=rendezvous
REACT_APP_RENDEZVOUS_PORT=9090

4
docker/env/contracts.docker.env

@ -0,0 +1,4 @@
# Variables needed in runtime
MIGRATE_NETWORK=develop
DEVELOP_CHAIN_HOST=ganache
DEVELOP_CHAIN_PORT=8545
Loading…
Cancel
Save