cic-internal-integration/contracts/custodial
2021-10-08 12:29:17 -07:00
..
.custodial improvement: updated folder structure 2021-10-08 12:29:17 -07:00
config improvement: updated folder structure 2021-10-08 12:29:17 -07:00
config_template improvement: updated folder structure 2021-10-08 12:29:17 -07:00
doc improvement: updated folder structure 2021-10-08 12:29:17 -07:00
docker improvement: updated folder structure 2021-10-08 12:29:17 -07:00
keystore improvement: updated folder structure 2021-10-08 12:29:17 -07:00
testdata improvement: updated folder structure 2021-10-08 12:29:17 -07:00
config.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00
envlist improvement: updated folder structure 2021-10-08 12:29:17 -07:00
from_env.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00
LICENSE.txt improvement: updated folder structure 2021-10-08 12:29:17 -07:00
nvm.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00
override_requirements.txt improvement: updated folder structure 2021-10-08 12:29:17 -07:00
README.md improvement: updated folder structure 2021-10-08 12:29:17 -07:00
requirements.txt improvement: updated folder structure 2021-10-08 12:29:17 -07:00
reset.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00
run_job.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00
sarafu_declaration.json improvement: updated folder structure 2021-10-08 12:29:17 -07:00
seed_cic_eth.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00
wait-for-it.sh improvement: updated folder structure 2021-10-08 12:29:17 -07:00

Contract Migration

Common docker artifacts and bootstrap scripts

How this repo works

This repo builds contracts and deploys them to a chain

First, bring up an eth evm provider

docker-compose up eth

Now build this repo's image and run it against the 'eth' service (ganache, for example). You will need to bind to the docker-compose network (cic-network) and mount the special contract output folder that dependent services use to get deployed contract addresses.

Here is how to do that in one shot:

docker build -t registry.gitlab.com/grassrootseconomics/cic-docker-internal -f docker/ . && docker run --env ETH_PROVIDER=http://eth:8545 --net cic-network -v cic-docker-internal_contract-config:/tmp/cic/config --rm -it registry.gitlab.com/grassrootseconomics/cic-docker-internal reset.sh

Stop the containers and bring down the services with

docker-compose down

If you want a fresh start to the dev environment then bring down the services and delete their associated volumes with

docker-compose down -v

A goal is to go through all of these containers and create a default non-root user a la: https://vsupalov.com/docker-shared-permissions/

Tips and Tricks

Sometimes you just want to hold a container open in docker compose so you can exec into it and poke around. Replace "command" with

    command:
      - /bin/sh
      - -c
      - |
        tail -f /dev/null

then

docker exec -it [IMAGE_NANE] sh