Merge branch 'bvander/ussd-integration' into 'master'

ussd configs

See merge request grassrootseconomics/cic-internal-integration!6
This commit is contained in:
Blair Vanderlugt 2021-02-06 03:27:59 +00:00
commit 8680d57a67
3 changed files with 82 additions and 75 deletions

@ -1 +1 @@
Subproject commit d4e5e71308997281e5cd118b9a88299fc5c2c2fd
Subproject commit c5ffcc19c5a48b101de689385c1ae971de0a5439

View File

@ -35,12 +35,12 @@ services:
context: apps/bloxbergValidatorSetup
restart: unless-stopped
ports:
- ${HTTP_PORT_ETH:-8545}:8545
- ${HTTP_PORT_ETH:-8545}
- 8546
- 30303
volumes:
- ./apps/bloxbergValidatorSetup/keys:/root/keys # stores the signing key locally
- bloxberg-data:/root/.local/share/io.parity.ethereum/chains/Bloxberg/db/
- bloxberg-data:/root/.local/share/io.parity.ethereum/
# See contents of /initdb/create_db.sql for app user, password and databases
postgres:
@ -49,7 +49,7 @@ services:
POSTGRES_HOST_AUTH_METHOD: trust # for postgres user access w/o password. Obvioulsy not safe but allows easy elevated debugging.
PGDATA: /tmp/cic/postgres
ports:
- ${HTTP_PORT_POSTGRES:-5432}
- 5432
volumes:
- ./scripts/initdb/create_db.sql:/docker-entrypoint-initdb.d/1-create_all_db.sql # init db scripts will run in order at container start
- postgres-db:/tmp/cic/postgres
@ -75,8 +75,8 @@ services:
contract-migration:
build:
context: apps
dockerfile: apps/contract-migration/docker/
context: apps/
dockerfile: contract-migration/docker/Dockerfile
environment:
# ETH_PROVIDER should be broken out into host/port but cic-eth expects this
ETH_PROVIDER: http://eth:8545
@ -90,35 +90,35 @@ services:
volumes:
- contract-config:/tmp/cic/config
cic-cache-tracker:
# image: registry.gitlab.com/grassrootseconomics/cic-cache:master-latest
build: apps/cic-cache
environment:
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS # supplied at contract-config after contract provisioning
ETH_PROVIDER: ${ETH_PROVIDER:-http://eth:8545}
BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
DATABASE_USER: ${DATABASE_USER:-grassroots}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql
DATABASE_HOST: ${DATABASE_HOST:-postgres}
DATABASE_PORT: ${DATABASE_PORT:-5432}
DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
deploy:
restart_policy:
condition: on-failure
depends_on:
- postgres
- eth
command:
- /bin/sh
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
/usr/local/bin/cic-cache-tracker -vv
volumes:
- contract-config:/tmp/cic/config/:ro
# cic-cache-tracker:
# # image: registry.gitlab.com/grassrootseconomics/cic-cache:master-latest
# build: apps/cic-cache
# environment:
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS # supplied at contract-config after contract provisioning
# ETH_PROVIDER: ${ETH_PROVIDER:-http://eth:8545}
# BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
# DATABASE_USER: ${DATABASE_USER:-grassroots}
# DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql
# DATABASE_HOST: ${DATABASE_HOST:-postgres}
# DATABASE_PORT: ${DATABASE_PORT:-5432}
# DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
# DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
# DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
# ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
# deploy:
# restart_policy:
# condition: on-failure
# depends_on:
# - postgres
# - eth
# command:
# - /bin/sh
# - -c
# - |
# if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
# /usr/local/bin/cic-cache-tracker -vv
# volumes:
# - contract-config:/tmp/cic/config/:ro
# entrypoint: ["/usr/local/bin/cic-cache-tracker", "-vv"]
# command: "/usr/local/bin/cic-cache-tracker -vv"
@ -453,43 +453,49 @@ services:
# - ${LOCAL_VOLUME_DIR:-/tmp/cic}/pgp:/tmp/cic/pgp
# command: "/root/start_server.sh -vv"
# cic-ussd-server:
# image: grassrootseconomics:cic-ussd
# environment:
# DATABASE_USER: $DATABASE_USER
# DATABASE_HOST: $DATABASE_HOST
# DATABASE_PORT: $DATABASE_PORT
# DATABASE_PASSWORD: $DATABASE_PASSWORD
# DATABASE_NAME: $DATABASE_NAME_CIC_USSD
# DATABASE_ENGINE: $DATABASE_ENGINE
# DATABASE_DRIVER: $DATABASE_DRIVER
# SERVER_PORT: 80
# ports:
# - ${HTTP_PORT_CIC_USSD}:80
# depends_on:
# - postgres
# - redis
# deploy:
# restart_policy:
# condition: on-failure
# command: "/root/start_uwsgi.sh"
cic-ussd-server:
# image: grassrootseconomics:cic-ussd
build:
context: apps/
dockerfile: cic-ussd/docker/Dockerfile
environment:
DATABASE_USER: grassroots
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_PASSWORD: tralala
DATABASE_NAME: cic_ussd
DATABASE_ENGINE: postgresql
DATABASE_DRIVER: psycopg2
SERVER_PORT: 80
ports:
- 80:8082
depends_on:
- postgres
- redis
deploy:
restart_policy:
condition: on-failure
command: "/root/start_uwsgi.sh"
# cic-ussd-tasker:
# image: grassrootseconomics:cic-ussd
# environment:
# DATABASE_USER: $DATABASE_USER
# DATABASE_HOST: $DATABASE_HOST
# DATABASE_PORT: $DATABASE_PORT
# DATABASE_PASSWORD: $DATABASE_PASSWORD
# DATABASE_NAME: $DATABASE_NAME_CIC_USSD
# DATABASE_ENGINE: $DATABASE_ENGINE
# DATABASE_DRIVER: $DATABASE_DRIVER
# CELERY_BROKER_URL: $CELERY_BROKER_URL
# CELERY_RESULT_URL: $CELERY_RESULT_URL
# depends_on:
# - postgres
# - redis
# deploy:
# restart_policy:
# condition: on-failure
# command: "/root/start_tasker.sh -q cic-ussd"
cic-ussd-tasker:
# image: grassrootseconomics:cic-ussd
build:
context: apps
dockerfile: cic-ussd/docker/Dockerfile
environment:
DATABASE_USER: grassroots
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_PASSWORD: tralala
DATABASE_NAME: cic_ussd
DATABASE_ENGINE: postgresql
DATABASE_DRIVER: psycopg2
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
CELERY_RESULT_URL: ${CELERY_BROKER_URL:-redis://redis}
depends_on:
- postgres
- redis
deploy:
restart_policy:
condition: on-failure
command: "/root/start_tasker.sh -q cic-ussd"

View File

@ -4,6 +4,7 @@ CREATE DATABASE "cic_eth";
CREATE DATABASE "cic_notify";
CREATE DATABASE "cic_meta";
CREATE DATABASE "cic_signer";
CREATE DATABASE "cic_ussd";
GRANT ALL PRIVILEGES
ON DATABASE "cic_cache", "cic_eth", "cic_notify", "cic_meta", "cic_signer"
ON DATABASE "cic_cache", "cic_eth", "cic_notify", "cic_meta", "cic_signer", "cic_ussd"
TO grassroots;