cic-internal-integration/apps/contract-migration
2021-07-14 11:08:07 +02:00
..
config_template init 2021-01-24 12:16:22 -08:00
doc init 2021-01-24 12:16:22 -08:00
docker Faster local builds with base image and buildkit and run all unit tests 2021-07-10 15:46:14 +00:00
keystore init 2021-01-24 12:16:22 -08:00
testdata Refactor import scripts 2021-02-21 15:41:37 +00:00
.dockerignore Faster local builds with base image and buildkit and run all unit tests 2021-07-10 15:46:14 +00:00
.gitlab-ci.yml Faster local builds with base image and buildkit and run all unit tests 2021-07-10 15:46:14 +00:00
envlist move envlist to dockercontainer 2021-03-09 16:54:33 -08:00
from_env.sh Add cic-eth and auxiliary contract seeding script 2021-02-10 07:03:11 +00:00
LICENSE.txt init 2021-01-24 12:16:22 -08:00
nvm.sh Refactor import scripts 2021-02-21 15:41:37 +00:00
override_requirements.txt Add explicit token type toggle in contract migration 2021-07-07 07:56:45 +00:00
README.md updating cic-eth build 2021-01-29 07:39:42 -08:00
requirements.txt Add demurrage token amount adjust task 2021-07-08 15:28:04 +00:00
reset.sh Expand token symbol and decimals in tx_collate 2021-07-14 11:08:07 +02:00
run_job.sh Add flavors of demurrage token to dev deployment 2021-07-05 10:58:08 +00:00
sarafu_declaration.json Add cic-eth and auxiliary contract seeding script 2021-02-10 07:03:11 +00:00
seed_cic_eth.sh update the create eth flags with redis host 2021-07-09 10:29:34 -07:00
wait-for-it.sh run reset.sh outside docker and fix deps 2021-02-22 06:27:59 -08: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