Browse Source

fix: various docker fixes

develop
Apostolos Fanakis 4 years ago
parent
commit
91075d0301
  1. 10
      docker/Makefile
  2. 4
      docker/env/contracts-test.env
  3. 4
      docker/env/contracts.env
  4. 2
      docker/ganache/Dockerfile
  5. 1
      packages/concordia-contracts/index.js

10
docker/Makefile

@ -11,6 +11,9 @@ run: compose-run build-contracts-provider run-contracts-provider build-contracts
run-staging: compose-run build-contracts-provider run-contracts-provider-staging build-contracts-migrate run-contracts-migrate build-pinner run-pinner-staging build-app-staging run-app-staging
@echo "Concordia is up and running, head over to http://localhost:7000."
prepare-network:
@docker network create --driver bridge concordia_concordia_network || true
# Targets for building/running/stopping the blockchain and rendezvous server (using the docker-compose file)
compose-build:
@docker-compose -f ./docker-compose.yml -p concordia build
@ -31,8 +34,7 @@ run-ganache-test:
# Rendezvous targets
run-rendezvous:
@docker network create --driver bridge concordia_concordia_network || true &&\
docker run -d -p 9090:9090 --name concordia-rendezvous --net=concordia_concordia_network libp2p/js-libp2p-webrtc-star:version-0.20.5
@docker run -d -p 9090:9090 --name concordia-rendezvous --net=concordia_concordia_network libp2p/js-libp2p-webrtc-star:version-0.20.5
# Contracts targets
build-contracts:
@ -42,9 +44,9 @@ build-contracts-migrate:
build-contracts-tests:
@docker build ../ -f ./concordia-contracts/Dockerfile --target test -t ecentrics/concordia-contracts-tests --build-arg TZ=Europe/Athens
run-contracts-tests:
@docker run --rm -v ${REPORTS}/contracts/:/mnt/concordia/test-reports/ --env-file=./env/contracts.env --net=concordia_concordia_network ecentrics/concordia-contracts-tests:latest
@docker run --rm -v ${REPORTS}/contracts/:/mnt/concordia/test-reports/ --env-file=./env/contracts-test.env --net=concordia_concordia_network ecentrics/concordia-contracts-tests:latest
run-contracts-tests-host-chain:
@docker run --rm -v ${REPORTS}/contracts/:/mnt/concordia/test-reports/ --env-file=./env/contracts.env --net=host ecentrics/concordia-contracts-tests:latest
@docker run --rm -v ${REPORTS}/contracts/:/mnt/concordia/test-reports/ --env-file=./env/contracts-test.env --net=host ecentrics/concordia-contracts-tests:latest
run-contracts-migrate:
@docker run --rm -v ${PACKAGES}/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./env/contracts.env --net=concordia_concordia_network ecentrics/concordia-contracts-migrate:latest
run-contracts-migrate-host-chain:

4
docker/env/contracts-test.env

@ -0,0 +1,4 @@
# Variables needed in runtime
MIGRATE_NETWORK=env
WEB3_HOST=concordia-ganache-test
WEB3_PORT=8546

4
docker/env/contracts.env

@ -5,6 +5,4 @@ WEB3_PORT=8545
CONTRACTS_PROVIDER_HOST=concordia-contracts-provider
CONTRACTS_PROVIDER_PORT=8400
TEST_CHAIN_HOST=concordia-ganache-test
TEST_CHAIN_PORT=8546
CONTRACTS_VERSION_TAG=docker

2
docker/ganache/Dockerfile

@ -1,6 +1,6 @@
FROM trufflesuite/ganache-cli:v6.12.2@sha256:c062707f17f355872d703cde3de6a12fc45a027ed42857c72514171a5f466ab7
RUN mkdir /home/ganache_db /home/ganache_keys
RUN mkdir -p /mnt/concordia/ganache_db /mnt/concordia/ganache_keys
WORKDIR /opt/concordia-ganache

1
packages/concordia-contracts/index.js

@ -1,3 +1,4 @@
/* eslint-disable import/no-unresolved */
let Forum, Voting, PostVoting;
/* eslint-disable global-require */

Loading…
Cancel
Save