Compare commits
1 Commits
master
...
bvander/bu
Author | SHA1 | Date | |
---|---|---|---|
d988dd6921 |
@ -2,7 +2,7 @@
|
|||||||
.cache
|
.cache
|
||||||
.dot
|
.dot
|
||||||
**/doc
|
**/doc
|
||||||
**/node_modules
|
node_modules/
|
||||||
**/venv
|
**/venv
|
||||||
**/.venv
|
**/.venv
|
||||||
|
|
||||||
|
@ -8,3 +8,5 @@ REDIS_PORT=6379
|
|||||||
USER_USSD_HOST=cic-user-ussd-server
|
USER_USSD_HOST=cic-user-ussd-server
|
||||||
USER_USSD_PORT=9000
|
USER_USSD_PORT=9000
|
||||||
KEYSTORE_FILE_PATH=/root/keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c
|
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 \
|
COPY package.json \
|
||||||
package-lock.json \
|
package-lock.json \
|
||||||
.
|
.
|
||||||
|
RUN npm ci --production
|
||||||
RUN --mount=type=cache,mode=0755,target=/root/node_modules npm install
|
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
|
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
|
||||||
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
|
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 \
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT [ ]
|
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
|
celery -A cic_ussd.import_task purge -Q cic-import-ussd --broker $CELERY_BROKER_URL -f
|
||||||
|
|
||||||
|
|
||||||
echo "running import_balance in the background..."
|
echo "running import_balance in the background..."
|
||||||
|
|
||||||
python cic_ussd/import_balance.py -v -c config -p $ETH_PROVIDER \
|
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"
|
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
|
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