Merge branch 'lash/improve-cic-cache-service' into 'master'
Iimprove cic cache service See merge request grassrootseconomics/cic-internal-integration!100
This commit is contained in:
commit
a8529ae2ef
@ -47,6 +47,9 @@ RUN git clone https://gitlab.com/grassrootseconomics/cic-contracts.git && \
|
|||||||
mkdir -p /usr/local/share/cic/solidity && \
|
mkdir -p /usr/local/share/cic/solidity && \
|
||||||
cp -R cic-contracts/abis /usr/local/share/cic/solidity/abi
|
cp -R cic-contracts/abis /usr/local/share/cic/solidity/abi
|
||||||
|
|
||||||
|
COPY cic-cache/docker/start_tracker.sh ./start_tracker.sh
|
||||||
|
COPY cic-cache/docker/db.sh ./db.sh
|
||||||
|
RUN chmod 755 ./*.sh
|
||||||
# Tracker
|
# Tracker
|
||||||
# ENTRYPOINT ["/usr/local/bin/cic-cache-tracker", "-vv"]
|
# ENTRYPOINT ["/usr/local/bin/cic-cache-tracker", "-vv"]
|
||||||
# Server
|
# Server
|
||||||
|
6
apps/cic-cache/docker/db.sh
Normal file
6
apps/cic-cache/docker/db.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
>&2 echo executing database migration
|
||||||
|
python scripts/migrate.py -c /usr/local/etc/cic-cache --migrations-dir /usr/local/share/cic-cache/alembic -vv
|
||||||
|
set +e
|
5
apps/cic-cache/docker/start_tracker.sh
Normal file
5
apps/cic-cache/docker/start_tracker.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ./db.sh
|
||||||
|
|
||||||
|
/usr/local/bin/cic-cache-trackerd $@
|
@ -1,13 +1,12 @@
|
|||||||
cic-base~=0.1.2a66
|
cic-base~=0.1.2a76
|
||||||
alembic==1.4.2
|
alembic==1.4.2
|
||||||
confini~=0.3.6rc3
|
confini~=0.3.6rc3
|
||||||
uwsgi==2.0.19.1
|
uwsgi==2.0.19.1
|
||||||
moolb~=0.1.0
|
moolb~=0.1.0
|
||||||
cic-eth-registry~=0.5.4a13
|
cic-eth-registry~=0.5.4a16
|
||||||
SQLAlchemy==1.3.20
|
SQLAlchemy==1.3.20
|
||||||
semver==2.13.0
|
semver==2.13.0
|
||||||
psycopg2==2.8.6
|
psycopg2==2.8.6
|
||||||
celery==4.4.7
|
celery==4.4.7
|
||||||
redis==3.5.3
|
redis==3.5.3
|
||||||
chainlib~=0.0.2a10
|
|
||||||
chainsyncer[sql]~=0.0.2a1
|
chainsyncer[sql]~=0.0.2a1
|
||||||
|
@ -145,7 +145,7 @@ services:
|
|||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
|
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
|
||||||
/usr/local/bin/cic-cache-trackerd -vv -c /usr/local/etc/cic-cache
|
./start_tracker.sh -c /usr/local/etc/cic-cache -vv
|
||||||
volumes:
|
volumes:
|
||||||
- contract-config:/tmp/cic/config/:ro
|
- contract-config:/tmp/cic/config/:ro
|
||||||
|
|
||||||
@ -191,13 +191,13 @@ services:
|
|||||||
context: apps
|
context: apps
|
||||||
dockerfile: cic-cache/docker/Dockerfile
|
dockerfile: cic-cache/docker/Dockerfile
|
||||||
environment:
|
environment:
|
||||||
DATABASE_USER: $DATABASE_USER
|
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
||||||
DATABASE_HOST: $DATABASE_HOST
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
DATABASE_PORT: $DATABASE_PORT
|
DATABASE_PORT: ${DATABASE_PORT:-5432}
|
||||||
DATABASE_PASSWORD: $DATABASE_PASSWORD
|
#DATABASE_PASSWORD: ${DATABASE_PASSWORD:-
|
||||||
DATABASE_NAME: $DATABASE_NAME_CIC_CACHE
|
DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
|
||||||
DATABASE_DEBUG: 1
|
DATABASE_DEBUG: 1
|
||||||
PGPASSWORD: $DATABASE_PASSWORD
|
#PGPASSWORD: $DATABASE_PASSWORD
|
||||||
SERVER_PORT: 8000
|
SERVER_PORT: 8000
|
||||||
ports:
|
ports:
|
||||||
- ${HTTP_PORT_CIC_CACHE:-63313}:8000
|
- ${HTTP_PORT_CIC_CACHE:-63313}:8000
|
||||||
@ -212,9 +212,10 @@ services:
|
|||||||
- |
|
- |
|
||||||
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
|
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
|
||||||
"/usr/local/bin/uwsgi" \
|
"/usr/local/bin/uwsgi" \
|
||||||
--wsgi-file /usr/src/cic-cache/cic_cache/runnable/serverd.py \
|
--wsgi-file /usr/src/cic-cache/cic_cache/runnable/daemons/server.py \
|
||||||
--http :8000 \
|
--http :8000 \
|
||||||
--pyargv -vv
|
--pyargv "-vv"
|
||||||
|
|
||||||
|
|
||||||
cic-eth-tasker:
|
cic-eth-tasker:
|
||||||
# image: grassrootseconomics:cic-eth-service
|
# image: grassrootseconomics:cic-eth-service
|
||||||
|
Loading…
Reference in New Issue
Block a user