docker compose setup

This commit is contained in:
Blair Vanderlugt 2021-01-25 08:21:30 -08:00
parent fc18b94e70
commit 897e0b8fbc
2 changed files with 48 additions and 39 deletions

View File

@ -5,6 +5,7 @@ volumes:
postgres-db: {} postgres-db: {}
contract-config: {} contract-config: {}
bee-data: {} bee-data: {}
signer-data: {}
networks: networks:
default: default:
@ -117,38 +118,46 @@ services:
# condition: on-failure # condition: on-failure
# command: "/root/start_uwsgi.sh" # command: "/root/start_uwsgi.sh"
# cic-eth-tasker: cic-eth-tasker:
# image: grassrootseconomics:cic-eth-service # image: grassrootseconomics:cic-eth-service
# environment: build:
# ETH_PROVIDER: $ETH_PROVIDER context: apps/cic-eth/
# ETH_ABI_DIR: $ETH_ABI_DIR dockerfile: docker/Dockerfile
# ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER environment:
# DATABASE_USER: $DATABASE_USER CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
# DATABASE_HOST: $DATABASE_HOST ETH_PROVIDER: ${ETH_PROVIDER:-http://eth:8545}
# DATABASE_PASSWORD: $DATABASE_PASSWORD ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
# DATABASE_PORT: $DATABASE_PORT DATABASE_USER: ${DATABASE_USER:-grassroots}
# DATABASE_ENGINE: $DATABASE_ENGINE DATABASE_HOST: ${DATABASE_HOST:-postgres}
# DATABASE_DRIVER: $DATABASE_DRIVER DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
# PGPASSWORD: $DATABASE_PASSWORD DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS DATABASE_PORT: ${DATABASE_PORT:-5432}
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
# BANCOR_DIR: $BANCOR_DIR DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
# CELERY_BROKER_URL: $CELERY_BROKER_URL PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
# CELERY_RESULT_URL: $CELERY_RESULT_URL CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-8995}
# SIGNER_SOCKET_PATH: $SIGNER_SOCKET_PATH BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
# SIGNER_SECRET: $SIGNER_SECRET CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://}
# ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: $DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER CELERY_RESULT_URL: ${CELERY_RESULT_URL:-""}
# depends_on: SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc}
# - eth SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef}
# - postgres ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}
# - redis depends_on:
# deploy: - eth
# restart_policy: - postgres
# condition: on-failure - redis
# volumes: deploy:
# - ${LOCAL_VOLUME_DIR:-/tmp/cic}/signer:/tmp/cic/signer restart_policy:
# command: "/root/start_tasker.sh -q cic-eth -vv" condition: on-failure
volumes:
- signer-data:/tmp/cic/signer
command:
- /bin/sh
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
"/root/start_tasker.sh -q cic-eth -vv"
# cic-eth-manager-head: # cic-eth-manager-head:
# image: grassrootseconomics:cic-eth-service # image: grassrootseconomics:cic-eth-service

View File

@ -1,9 +1,9 @@
CREATE USER grassroots WITH PASSWORD 'tralala' CREATEDB; CREATE USER grassroots WITH PASSWORD 'tralala' CREATEDB;
CREATE DATABASE "cic-cache"; CREATE DATABASE "cic_cache";
CREATE DATABASE "cic-eth"; CREATE DATABASE "cic_eth";
CREATE DATABASE "cic-notify"; CREATE DATABASE "cic_notify";
CREATE DATABASE "cic-meta"; CREATE DATABASE "cic_meta";
CREATE DATABASE "cic-signer"; CREATE DATABASE "cic_signer";
GRANT ALL PRIVILEGES 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"
TO grassroots; TO grassroots;