|
@ -4,11 +4,11 @@ REPORTS := $(abspath ${CURDIR}/reports) |
|
|
GANACHE_VOLUMES := $(abspath ${CURDIR}/ganache/volumes) |
|
|
GANACHE_VOLUMES := $(abspath ${CURDIR}/ganache/volumes) |
|
|
CONTRACTS_PROVIDER_VOLUMES := $(abspath ${CURDIR}/concordia-contracts-provider/volumes) |
|
|
CONTRACTS_PROVIDER_VOLUMES := $(abspath ${CURDIR}/concordia-contracts-provider/volumes) |
|
|
DOCKER_BUILDKIT = 1 |
|
|
DOCKER_BUILDKIT = 1 |
|
|
PINNER_VOLUMES := $(abspath ${CURDIR}/pinner/volumes) |
|
|
PINNER_VOLUMES := $(abspath ${CURDIR}/concordia-pinner/volumes) |
|
|
|
|
|
|
|
|
run: compose-run build-contracts-migrate run-contracts-migrate build-app run-app |
|
|
run: compose-run build-contracts-provider run-contracts-provider build-contracts-migrate run-contracts-migrate build-pinner run-pinner build-app run-app |
|
|
@echo "Concordia is up and running, head over to http://localhost:7777." |
|
|
@echo "Concordia is up and running, head over to http://localhost:7777." |
|
|
run-staging: compose-run build-contracts-migrate run-contracts-migrate build-app-staging run-app-staging |
|
|
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." |
|
|
@echo "Concordia is up and running, head over to http://localhost:7000." |
|
|
|
|
|
|
|
|
# Targets for building/running/stopping the blockchain and rendezvous server (using the docker-compose file)
|
|
|
# Targets for building/running/stopping the blockchain and rendezvous server (using the docker-compose file)
|
|
@ -25,16 +25,14 @@ compose-stop-clean-data: |
|
|
build-ganache: |
|
|
build-ganache: |
|
|
@docker build ../ -f ./ganache/Dockerfile -t ecentrics/concordia-ganache |
|
|
@docker build ../ -f ./ganache/Dockerfile -t ecentrics/concordia-ganache |
|
|
run-ganache: |
|
|
run-ganache: |
|
|
@docker network create --driver bridge concordia_ganache_network || true &&\
|
|
|
@docker run -d -v ${GANACHE_VOLUMES}/ganache_keys:/home/ganache_keys -p 8545:8545 --env-file=./env/ganache.env --name concordia-ganache --net=concordia_concordia_network ecentrics/concordia-ganache:latest |
|
|
docker run -d -v ${GANACHE_VOLUMES}/ganache_keys:/home/ganache_keys -p 8545:8545 --env-file=./env/ganache.env --name concordia-ganache --net=concordia_ganache_network ecentrics/concordia-ganache:latest |
|
|
|
|
|
run-ganache-test: |
|
|
run-ganache-test: |
|
|
@docker network create --driver bridge concordia_ganache_test_network || true &&\
|
|
|
@docker run --rm -d -p 8546:8546 --env-file=./env/ganache.test.env --name concordia-ganache-test --net=concordia_concordia_network ecentrics/concordia-ganache:latest |
|
|
docker run --rm -d -p 8546:8546 --env-file=./env/ganache.test.env --name concordia-ganache-test --net=concordia_ganache_test_network ecentrics/concordia-ganache:latest |
|
|
|
|
|
|
|
|
|
|
|
# Rendezvous targets
|
|
|
# Rendezvous targets
|
|
|
run-rendezvous: |
|
|
run-rendezvous: |
|
|
@docker network create --driver bridge concordia_rendezvous_network || true &&\
|
|
|
@docker network create --driver bridge concordia_concordia_network || true &&\
|
|
|
docker run -d -p 9090:9090 --name concordia-rendezvous 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
|
|
|
# Contracts targets
|
|
|
build-contracts: |
|
|
build-contracts: |
|
@ -44,11 +42,11 @@ build-contracts-migrate: |
|
|
build-contracts-tests: |
|
|
build-contracts-tests: |
|
|
@docker build ../ -f ./concordia-contracts/Dockerfile --target test -t ecentrics/concordia-contracts-tests --build-arg TZ=Europe/Athens |
|
|
@docker build ../ -f ./concordia-contracts/Dockerfile --target test -t ecentrics/concordia-contracts-tests --build-arg TZ=Europe/Athens |
|
|
run-contracts-tests: |
|
|
run-contracts-tests: |
|
|
@docker run --rm -v ${REPORTS}/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_ganache_test_network ecentrics/concordia-contracts-tests:latest |
|
|
@docker run --rm -v ${REPORTS}/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_concordia_network ecentrics/concordia-contracts-tests:latest |
|
|
run-contracts-tests-host-chain: |
|
|
run-contracts-tests-host-chain: |
|
|
@docker run --rm -v ${REPORTS}/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=host ecentrics/concordia-contracts-tests:latest |
|
|
@docker run --rm -v ${REPORTS}/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=host ecentrics/concordia-contracts-tests:latest |
|
|
run-contracts-migrate: |
|
|
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_ganache_network ecentrics/concordia-contracts-migrate:latest |
|
|
@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: |
|
|
run-contracts-migrate-host-chain: |
|
|
@docker run --rm -v ${PACKAGES}/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./env/contracts.env --net=host ecentrics/concordia-contracts-migrate:latest |
|
|
@docker run --rm -v ${PACKAGES}/concordia-contracts/build/:/usr/src/concordia/packages/concordia-contracts/build/ --env-file=./env/contracts.env --net=host ecentrics/concordia-contracts-migrate:latest |
|
|
get-contracts: |
|
|
get-contracts: |
|
@ -64,13 +62,9 @@ build-app-tests: |
|
|
run-app-tests: |
|
|
run-app-tests: |
|
|
@docker run --rm -v ${REPORTS}/app/:/usr/test-reports/ --env-file=./env/concordia.env ecentrics/concordia-app-tests:latest |
|
|
@docker run --rm -v ${REPORTS}/app/:/usr/test-reports/ --env-file=./env/concordia.env ecentrics/concordia-app-tests:latest |
|
|
run-app: |
|
|
run-app: |
|
|
@docker create --env-file=./env/concordia.env -p 7777:80 --name concordia-app --net=concordia_ganache_network ecentrics/concordia-app:latest &&\
|
|
|
@docker run -d --env-file=./env/concordia.env -p 7777:80 --name concordia-app ecentrics/concordia-app:latest |
|
|
docker network connect concordia_rendezvous_network concordia-app &&\
|
|
|
|
|
|
docker start concordia-app |
|
|
|
|
|
run-app-staging: |
|
|
run-app-staging: |
|
|
@docker create -it --env-file=./env/concordia.env -p 7000:3000 --name concordia-app-staging --net=concordia_ganache_network ecentrics/concordia-app-staging:latest &&\
|
|
|
@docker run -itd --env-file=./env/concordia.env -p 7000:3000 --name concordia-app-staging ecentrics/concordia-app-staging:latest |
|
|
docker network connect concordia_rendezvous_network concordia-app-staging &&\
|
|
|
|
|
|
docker start concordia-app-staging |
|
|
|
|
|
run-app-host-chain: |
|
|
run-app-host-chain: |
|
|
@docker run -d --env-file=./env/concordia.env --name concordia-app --net=host ecentrics/concordia-app:latest |
|
|
@docker run -d --env-file=./env/concordia.env --name concordia-app --net=host ecentrics/concordia-app:latest |
|
|
|
|
|
|
|
@ -78,17 +72,17 @@ run-app-host-chain: |
|
|
build-contracts-provider: |
|
|
build-contracts-provider: |
|
|
@docker build ../ -f ./concordia-contracts-provider/Dockerfile -t ecentrics/concordia-contracts-provider --build-arg TZ=Europe/Athens |
|
|
@docker build ../ -f ./concordia-contracts-provider/Dockerfile -t ecentrics/concordia-contracts-provider --build-arg TZ=Europe/Athens |
|
|
run-contracts-provider-staging: |
|
|
run-contracts-provider-staging: |
|
|
@docker run -d -v ${CONTRACTS_PROVIDER_VOLUMES}/contracts:/data/contracts --env-file=./env/contracts-provider.env -e NODE_ENV=production -p 8400:8400 --name concordia-contracts-provider ecentrics/concordia-contracts-provider:latest |
|
|
@docker run -d -v ${CONTRACTS_PROVIDER_VOLUMES}/contracts:/data/contracts --env-file=./env/contracts-provider.env -e NODE_ENV=production -p 8400:8400 --name concordia-contracts-provider --net=concordia_concordia_network ecentrics/concordia-contracts-provider:latest |
|
|
run-contracts-provider: |
|
|
run-contracts-provider: |
|
|
@docker run -d -v ${CONTRACTS_PROVIDER_VOLUMES}/contracts:/data/contracts --env-file=./env/contracts-provider.env -p 8400:8400 --name concordia-contracts-provider ecentrics/concordia-contracts-provider:latest |
|
|
@docker run -d -v ${CONTRACTS_PROVIDER_VOLUMES}/contracts:/data/contracts --env-file=./env/contracts-provider.env -p 8400:8400 --name concordia-contracts-provider --net=concordia_concordia_network ecentrics/concordia-contracts-provider:latest |
|
|
|
|
|
|
|
|
# Contracts provider targets
|
|
|
# Pinner targets
|
|
|
build-pinner: |
|
|
build-pinner: |
|
|
@docker build ../ -f ./concordia-pinner/Dockerfile -t ecentrics/concordia-pinner --build-arg TZ=Europe/Athens |
|
|
@docker build ../ -f ./concordia-pinner/Dockerfile -t ecentrics/concordia-pinner --build-arg TZ=Europe/Athens |
|
|
run-pinner-staging: |
|
|
run-pinner-staging: |
|
|
@docker run -d -v ${PINNER_VOLUMES}/orbitdb:/data/orbitdb --env-file=./env/pinner.env -e NODE_ENV=production -p 4444:4444 --name concordia-pinner ecentrics/concordia-pinner:latest |
|
|
@docker run -d -v ${PINNER_VOLUMES}/orbitdb:/data/orbitdb --env-file=./env/pinner.env -e NODE_ENV=production -p 4444:4444 --name concordia-pinner --net=concordia_concordia_network ecentrics/concordia-pinner:latest |
|
|
run-pinner: |
|
|
run-pinner: |
|
|
@docker run -d -v ${PINNER_VOLUMES}/orbitdb:/data/orbitdb --env-file=./env/pinner.env -p 4444:4444 --name concordia-pinner ecentrics/concordia-pinner:latest |
|
|
@docker run -d -v ${PINNER_VOLUMES}/orbitdb:/data/orbitdb --env-file=./env/pinner.env -p 4444:4444 --name concordia-pinner --net=concordia_concordia_network ecentrics/concordia-pinner:latest |
|
|
run-pinner-staging-host: |
|
|
run-pinner-staging-host: |
|
|
@docker run -d -v ${PINNER_VOLUMES}/orbitdb:/data/orbitdb --env-file=./env/pinner.env -e NODE_ENV=production --net=host --name concordia-pinner ecentrics/concordia-pinner:latest |
|
|
@docker run -d -v ${PINNER_VOLUMES}/orbitdb:/data/orbitdb --env-file=./env/pinner.env -e NODE_ENV=production --net=host --name concordia-pinner ecentrics/concordia-pinner:latest |
|
|
run-pinner-host: |
|
|
run-pinner-host: |
|
|