Compare commits
1 Commits
master
...
bvander/bu
Author | SHA1 | Date | |
---|---|---|---|
d988dd6921 |
@ -2,7 +2,7 @@
|
||||
.cache
|
||||
.dot
|
||||
**/doc
|
||||
**/node_modules
|
||||
node_modules/
|
||||
**/venv
|
||||
**/.venv
|
||||
|
||||
|
@ -8,3 +8,5 @@ REDIS_PORT=6379
|
||||
USER_USSD_HOST=cic-user-ussd-server
|
||||
USER_USSD_PORT=9000
|
||||
KEYSTORE_FILE_PATH=/root/keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c
|
||||
OUT_DIR=out
|
||||
NUMBER_OF_USERS=100
|
||||
|
@ -8,11 +8,9 @@ RUN mkdir -vp /usr/local/etc/cic
|
||||
COPY package.json \
|
||||
package-lock.json \
|
||||
.
|
||||
|
||||
RUN --mount=type=cache,mode=0755,target=/root/node_modules npm install
|
||||
RUN npm ci --production
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
|
||||
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
|
||||
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install \
|
||||
@ -21,4 +19,5 @@ RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install \
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
ENTRYPOINT [ ]
|
||||
|
@ -41,14 +41,27 @@ echo "purging existing ussd tasks..."
|
||||
|
||||
celery -A cic_ussd.import_task purge -Q cic-import-ussd --broker $CELERY_BROKER_URL -f
|
||||
|
||||
|
||||
echo "running import_balance in the background..."
|
||||
|
||||
python cic_ussd/import_balance.py -v -c config -p $ETH_PROVIDER \
|
||||
-r $CIC_REGISTRY_ADDRESS --token-symbol $TOKEN_SYMBOL -y $KEYSTORE_FILE_PATH $OUT_DIR 2>&1 &
|
||||
-r $CIC_REGISTRY_ADDRESS --token-symbol $TOKEN_SYMBOL -y $KEYSTORE_FILE_PATH $OUT_DIR > import_task_log.log &
|
||||
|
||||
echo "import_balance pid: $!"
|
||||
import_pid=$!
|
||||
echo "import_balance pid: $import_pid"
|
||||
|
||||
echo "importing accounts"
|
||||
|
||||
python cic_ussd/import_users.py -vv -c config --ussd-host $USER_USSD_HOST --ussd-port $USER_USSD_PORT --ussd-no-ssl out
|
||||
|
||||
echo "importing user meta data"
|
||||
node cic_meta/import_meta.js $OUT_DIR $NUMBER_OF_USERS
|
||||
|
||||
echo "import meta prefereneces"
|
||||
node cic_meta/import_meta_preferences.js $OUT_DIR $NUMBER_OF_USERS
|
||||
|
||||
echo "Running validation!"
|
||||
python verify.py -v -c config -r $CIC_REGISTRY_ADDRESS -p $ETH_PROVIDER \
|
||||
--token-symbol $TOKEN_SYMBOL $OUT_DIR
|
||||
|
||||
kill $import_pid
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user