385 lines
12 KiB
YAML
385 lines
12 KiB
YAML
|
version: "3"
|
||
|
|
||
|
volumes:
|
||
|
ganache-db: {}
|
||
|
postgres-db: {}
|
||
|
contract-config: {}
|
||
|
bee-data: {}
|
||
|
|
||
|
networks:
|
||
|
default:
|
||
|
name: cic-network
|
||
|
|
||
|
services:
|
||
|
eth:
|
||
|
image: trufflesuite/ganache-cli
|
||
|
ports:
|
||
|
- ${HTTP_PORT_ETH:-8545}
|
||
|
- ${WS_PORT_ETH:-8546}
|
||
|
# Note! -e switch doesnt work, whatever you put there, it will be 100
|
||
|
command: "-i 8995 -e 100 -l 9000000 -m '${DEV_MNEMONIC:-\"history stumble mystery avoid embark arrive mom foil pledge keep grain dice\"}' -v --db /tmp/cic/ganache/ganache.db --noVMErrorsOnRPCResponse"
|
||
|
volumes:
|
||
|
- ganache-db:/tmp/cic/ganache
|
||
|
|
||
|
# See contents of /initdb/create_db.sql for app user, password and databases
|
||
|
postgres:
|
||
|
image: postgres:12.5-alpine
|
||
|
environment:
|
||
|
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}
|
||
|
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
|
||
|
|
||
|
redis:
|
||
|
image: redis:6.0.9-alpine
|
||
|
ports:
|
||
|
- ${HTTP_PORT_REDIS:-6379}
|
||
|
command: "--loglevel verbose"
|
||
|
|
||
|
bee:
|
||
|
image: ethersphere/bee:0.4.1
|
||
|
container_name: bee
|
||
|
environment:
|
||
|
BEE_NETWORK_ID: ${BEE_NETWORK_ID:-313}
|
||
|
BEE_PASSWORD: $BEE_PASSWORD
|
||
|
ports:
|
||
|
- 1633
|
||
|
- 1635
|
||
|
command: "start --swap-enable=false --standalone"
|
||
|
volumes:
|
||
|
- bee-data:/tmp/cic/bee
|
||
|
|
||
|
contract-migration:
|
||
|
build: apps/contract-migration
|
||
|
environment:
|
||
|
# ETH_PROVIDER should be broken out into host/port but cic-eth expects this
|
||
|
ETH_PROVIDER: http://eth:8545
|
||
|
# And these two are for wait-for-it (could parse this)
|
||
|
ETH_PROVIDER_HOST: eth
|
||
|
ETH_PROVIDER_PORT: 8545
|
||
|
command: ["./reset.sh"]
|
||
|
depends_on:
|
||
|
- eth
|
||
|
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
|
||
|
# entrypoint: ["/usr/local/bin/cic-cache-tracker", "-vv"]
|
||
|
# command: "/usr/local/bin/cic-cache-tracker -vv"
|
||
|
|
||
|
# cic-cache-server:
|
||
|
# image: grassrootseconomics:cic-cache-uwsgi
|
||
|
# environment:
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_CACHE
|
||
|
# PGPASSWORD: $DATABASE_PASSWORD
|
||
|
# SERVER_PORT: 80
|
||
|
# ports:
|
||
|
# - ${HTTP_PORT_CIC_CACHE}:80
|
||
|
# depends_on:
|
||
|
# - postgres
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# command: "/root/start_uwsgi.sh"
|
||
|
|
||
|
# cic-eth-tasker:
|
||
|
# image: grassrootseconomics:cic-eth-service
|
||
|
# environment:
|
||
|
# ETH_PROVIDER: $ETH_PROVIDER
|
||
|
# ETH_ABI_DIR: $ETH_ABI_DIR
|
||
|
# ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# PGPASSWORD: $DATABASE_PASSWORD
|
||
|
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||
|
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
|
||
|
# BANCOR_DIR: $BANCOR_DIR
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# SIGNER_SOCKET_PATH: $SIGNER_SOCKET_PATH
|
||
|
# SIGNER_SECRET: $SIGNER_SECRET
|
||
|
# ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: $DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER
|
||
|
# depends_on:
|
||
|
# - eth
|
||
|
# - postgres
|
||
|
# - redis
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# volumes:
|
||
|
# - ${LOCAL_VOLUME_DIR:-/tmp/cic}/signer:/tmp/cic/signer
|
||
|
# command: "/root/start_tasker.sh -q cic-eth -vv"
|
||
|
|
||
|
# cic-eth-manager-head:
|
||
|
# image: grassrootseconomics:cic-eth-service
|
||
|
# environment:
|
||
|
# ETH_PROVIDER: $ETH_PROVIDER
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||
|
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
|
||
|
# BANCOR_DIR: $BANCOR_DIR
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# TASKS_TRANSFER_CALLBACKS: $TASKS_TRANSFER_CALLBACKS
|
||
|
# depends_on:
|
||
|
# - eth
|
||
|
# - postgres
|
||
|
# - redis
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# command: "/root/start_manager.sh head -vv"
|
||
|
|
||
|
# cic-eth-manager-history:
|
||
|
# image: grassrootseconomics:cic-eth-service
|
||
|
# environment:
|
||
|
# ETH_PROVIDER: $ETH_PROVIDER
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||
|
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
|
||
|
# BANCOR_DIR: $BANCOR_DIR
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# depends_on:
|
||
|
# - eth
|
||
|
# - postgres
|
||
|
# - redis
|
||
|
# #deploy:
|
||
|
# #restart_policy:
|
||
|
# # condition: on-failure
|
||
|
# command: "/root/start_manager.sh history -vv"
|
||
|
|
||
|
# cic-eth-dispatcher:
|
||
|
# image: grassrootseconomics:cic-eth-service
|
||
|
# environment:
|
||
|
# ETH_PROVIDER: $ETH_PROVIDER
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||
|
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
|
||
|
# BANCOR_DIR: $BANCOR_DIR
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# depends_on:
|
||
|
# - eth
|
||
|
# - postgres
|
||
|
# - redis
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# command: "/root/start_dispatcher.sh -q cic-eth -vv"
|
||
|
|
||
|
|
||
|
# cic-eth-retrier:
|
||
|
# image: grassrootseconomics:cic-eth-service
|
||
|
# environment:
|
||
|
# ETH_PROVIDER: $ETH_PROVIDER
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||
|
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
|
||
|
# BANCOR_DIR: $BANCOR_DIR
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# depends_on:
|
||
|
# - eth
|
||
|
# - postgres
|
||
|
# - redis
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# command: "/root/start_retry.sh -q cic-eth -vv"
|
||
|
|
||
|
|
||
|
# cic-eth-server:
|
||
|
# image: grassrootseconomics:cic-eth-service
|
||
|
# environment:
|
||
|
# # ETH_PROVIDER: $ETH_PROVIDER
|
||
|
# # DATABASE_USER: $DATABASE_USER
|
||
|
# # DATABASE_HOST: $DATABASE_HOST
|
||
|
# # DATABASE_PORT: $DATABASE_PORT
|
||
|
# # DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# # DATABASE_NAME: $DATABASE_NAME_CIC_ETH
|
||
|
# # DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# # DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# # CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||
|
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
|
||
|
# # BANCOR_DIR: $BANCOR_DIR
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# SERVER_PORT: 80
|
||
|
# ports:
|
||
|
# - ${HTTP_PORT_CIC_ETH}:80
|
||
|
# depends_on:
|
||
|
# # - eth
|
||
|
# # - postgres
|
||
|
# - redis
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# #command: "/bin/bash-c uwsgi --wsgi-file /usr/src/cic-eth/cic_eth/runnable/server_agent.py --http :80 --pyargv '-vv'"
|
||
|
# #command: "uwsgi"
|
||
|
# entrypoint:
|
||
|
# - "/usr/local/bin/uwsgi"
|
||
|
# - "--wsgi-file"
|
||
|
# - "/usr/src/cic-eth/cic_eth/runnable/server_agent.py"
|
||
|
# - "--http"
|
||
|
# - ":80"
|
||
|
# command: "--pyargv -vv"
|
||
|
|
||
|
|
||
|
|
||
|
# cic-notify-tasker:
|
||
|
# image: grassrootseconomics:cic-notify-service
|
||
|
# environment:
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_NOTIFY
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# PGPASSWORD: $DATABASE_PASSWORD
|
||
|
# CELERY_BROKER_URL: $CELERY_BROKER_URL
|
||
|
# CELERY_RESULT_URL: $CELERY_RESULT_URL
|
||
|
# TASKS_AFRICASTALKING: $TASKS_AFRICASTALKING
|
||
|
# TASKS_SMS_DB: $TASKS_SMS_DB
|
||
|
# TASKS_LOG: $TASKS_LOG
|
||
|
# depends_on:
|
||
|
# - postgres
|
||
|
# - redis
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# command: "/root/start_tasker.sh -q cic-notify"
|
||
|
|
||
|
|
||
|
# cic-meta-server:
|
||
|
# image: grassrootseconomics:cic-meta-server
|
||
|
# environment:
|
||
|
# DATABASE_USER: $DATABASE_USER
|
||
|
# DATABASE_HOST: $DATABASE_HOST
|
||
|
# DATABASE_PORT: $DATABASE_PORT
|
||
|
# DATABASE_PASSWORD: $DATABASE_PASSWORD
|
||
|
# DATABASE_NAME: $DATABASE_NAME_CIC_META
|
||
|
# DATABASE_ENGINE: $DATABASE_ENGINE
|
||
|
# DATABASE_DRIVER: $DATABASE_DRIVER
|
||
|
# DATABASE_SCHEMA_SQL_PATH: $DATABASE_SCHEMA_SQL_PATH_CIC_META
|
||
|
# SERVER_PORT: 80
|
||
|
# PGP_PASSPHRASE: $PGP_PASSPHRASE
|
||
|
# PGP_EXPORTS_DIR: $PGP_EXPORTS_DIR
|
||
|
# PGP_PRIVATEKEY_FILE: $PGP_PRIVATEKEY_FILE
|
||
|
# ports:
|
||
|
# - ${HTTP_PORT_CIC_META}:80
|
||
|
# depends_on:
|
||
|
# - postgres
|
||
|
# deploy:
|
||
|
# restart_policy:
|
||
|
# condition: on-failure
|
||
|
# volumes:
|
||
|
# - ${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-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"
|