From 5dfb96ec0cae977a8de31b3cf8a37fd2dde2eb32 Mon Sep 17 00:00:00 2001 From: nolash Date: Fri, 15 Oct 2021 23:11:00 +0200 Subject: [PATCH] Add new cic-signer app --- .../erc20-demurrage-token/requirements.txt | 6 ++-- .../erc20-demurrage-token/setup.cfg | 2 +- apps/cic-eth/docker/Dockerfile | 2 +- apps/cic-signer/Dockerfile | 24 +++++++++++++ apps/cic-signer/requirements.txt | 1 + docker-compose.yml | 1 - docker-compose_local.yml | 35 +++++++++++++++++-- 7 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 apps/cic-signer/Dockerfile create mode 100644 apps/cic-signer/requirements.txt diff --git a/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt b/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt index 5a01755e..618aae32 100644 --- a/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt +++ b/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt @@ -1,5 +1,5 @@ celery==4.4.7 erc20-demurrage-token~=0.0.5a3 -cic-eth-registry~=0.6.1a5 -chainlib~=0.0.9rc3 -cic_eth~=0.12.4a9 +cic-eth-registry~=0.6.1a6 +chainlib~=0.0.9rc1 +cic_eth~=0.12.4a11 diff --git a/apps/cic-eth-aux/erc20-demurrage-token/setup.cfg b/apps/cic-eth-aux/erc20-demurrage-token/setup.cfg index 0e32d37f..aeddf926 100644 --- a/apps/cic-eth-aux/erc20-demurrage-token/setup.cfg +++ b/apps/cic-eth-aux/erc20-demurrage-token/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cic-eth-aux-erc20-demurrage-token -version = 0.0.2a6 +version = 0.0.2a7 description = cic-eth tasks supporting erc20 demurrage token author = Louis Holbrook author_email = dev@holbrook.no diff --git a/apps/cic-eth/docker/Dockerfile b/apps/cic-eth/docker/Dockerfile index 3c27babd..5411ac67 100644 --- a/apps/cic-eth/docker/Dockerfile +++ b/apps/cic-eth/docker/Dockerfile @@ -27,7 +27,7 @@ RUN pip install --index-url $PIP_INDEX_URL \ --force-reinstall \ --no-cache \ --extra-index-url $EXTRA_PIP_INDEX_URL $EXTRA_PIP_ARGS \ - cic-eth-aux-erc20-demurrage-token~=0.0.2a6 + cic-eth-aux-erc20-demurrage-token~=0.0.2a7 COPY *requirements.txt ./ diff --git a/apps/cic-signer/Dockerfile b/apps/cic-signer/Dockerfile new file mode 100644 index 00000000..eed3dab6 --- /dev/null +++ b/apps/cic-signer/Dockerfile @@ -0,0 +1,24 @@ +ARG DOCKER_REGISTRY="registry.gitlab.com/grassrootseconomics" + +FROM $DOCKER_REGISTRY/cic-base-images:python-3.8.6-dev-55da5f4e as dev + + +WORKDIR /root + +COPY requirements.txt . + +ARG pip_index_url=https://pypi.org/simple +ARG EXTRA_PIP_INDEX_URL="https://pip.grassrootseconomics.net:8433" +ARG EXTRA_PIP_ARGS="" +ARG PIP_INDEX_URL="https://pypi.org/simple" +ARG pip_trusted_host=pypi.org +RUN pip install --index-url $PIP_INDEX_URL \ + --pre \ + --force-reinstall \ + --no-cache \ + --extra-index-url $EXTRA_PIP_INDEX_URL $EXTRA_PIP_ARGS \ + -r requirements.txt + +COPY . . + +#RUN chmod +x *.sh diff --git a/apps/cic-signer/requirements.txt b/apps/cic-signer/requirements.txt new file mode 100644 index 00000000..4a2e9bf3 --- /dev/null +++ b/apps/cic-signer/requirements.txt @@ -0,0 +1 @@ +funga-eth[sql]>=0.5.1a1,<0.6.0 diff --git a/docker-compose.yml b/docker-compose.yml index ddf1f377..1b47a962 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -378,7 +378,6 @@ services: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} environment: RPC_PROVIDER: ${RPC_PROVIDER:-http://eth:8545} - ETH_PROVIDER: ${RPC_PROVIDER:-http://eth:8545} DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} diff --git a/docker-compose_local.yml b/docker-compose_local.yml index 1e60b65f..9503cf98 100644 --- a/docker-compose_local.yml +++ b/docker-compose_local.yml @@ -112,7 +112,7 @@ services: CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis} CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis} CELERY_DEBUG: ${CELERY_DEBUG:-1} - SIGNER_PROVIDER: ${SIGNER_PROVIDER:-http://cic-eth-signer:8000} + SIGNER_PROVIDER: ${SIGNER_PROVIDER:-http://cic-signer:8000} SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef} TASKS_TRACE_QUEUE_STATUS: ${TASKS_TRACE_QUEUE_STATUS:-1} restart: unless-stopped @@ -120,7 +120,7 @@ services: - evm - postgres - redis - # - cic-eth-signer + - cic-signer volumes: - signer-data:/run/crypto-dev-signer - contract-config:/tmp/cic/config/:ro @@ -135,3 +135,34 @@ services: set +a ./start_tasker.sh --aux-all -q cic-eth -vv + + cic-signer: + image: ${DEV_DOCKER_REGISTRY:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/funga-eth:${TAG:-latest} + build: + context: apps/cic-signer + dockerfile: Dockerfile + target: dev + args: + DOCKER_REGISTRY: $DEV_DOCKER_REGISTRY + PIP_INDEX_URL: ${PIP_INDEX_URL:-https://pypi.org/simple} + EXTRA_PIP_INDEX_URL: $EXTRA_PIP_INDEX_URL + EXTRA_PIP_ARGS: $EXTRA_PIP_ARGS + environment: + DATABASE_HOST: ${DATABASE_HOST:-postgres} + DATABASE_PORT: ${DATABASE_PORT:-5432} + #DATABASE_NAME: ${DATABASE_NAME:-cic_signer} + DATABASE_NAME: ${DATABASE_NAME:-cic_eth} + DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} + DATABASE_USER: ${DATABASE_USER:-grassroots} + DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres} + DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2} + DATABASE_DEBUG: ${DATABASE_DEBUG:-0} + DATABASE_POOL_SIZE: 0 + SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-http://0.0.0.0:8000} + SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef} + depends_on: + - postgres + volumes: + - signer-data:/run/crypto-dev-signer + - contract-config:/tmp/cic/config/:ro + command: ["python", "/usr/local/bin/funga-ethd", "-vv"]