-
Notifications
You must be signed in to change notification settings - Fork 58
/
provision-heroku-origin.sh
executable file
·36 lines (32 loc) · 1.32 KB
/
provision-heroku-origin.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
heroku apps:create ${PREFIX}-origin-ui-${STAGE} -t ${TEAM} --region eu
heroku apps:create ${PREFIX}-origin-api-${STAGE} -t ${TEAM} --region eu
if heroku addons -a ${PREFIX}-origin-api-${STAGE} --json | grep postgresql
then
echo "PostgreSQL already provisioned";
else
heroku addons:create heroku-postgresql:hobby-dev -a ${PREFIX}-origin-api-${STAGE}
fi
heroku config:set --app ${PREFIX}-origin-api-${STAGE} \
BACKEND_PORT=443 \
BACKEND_URL=https://${PREFIX}-origin-api-${STAGE}.herokuapp.com \
ISSUER_ID='Issuer ID' \
JWT_EXPIRY_TIME='7 days' \
REGISTRATION_MESSAGE_TO_SIGN='I register as Origin user' \
UI_BASE_URL=https://${PREFIX}-origin-ui-${STAGE}.herokuapp.com \
WEB3='https://volta-rpc-origin-0a316ab339e3d2ee3.energyweb.org' \
DEPLOY_KEY='<KEY>' \
EXCHANGE_ACCOUNT_DEPLOYER_PRIV='<KEY>' \
EXCHANGE_WALLET_PRIV='<KEY>' \
EXCHANGE_WALLET_PUB='<KEY>' \
EXCHANGE_PRICE_STRATEGY=0 \
EXCHANGE_WALLET_MIN_EWT='0.01' \
JWT_SECRET='<SECRET>' \
MANDRILL_API_KEY='<KEY>' \
ENERGY_PER_UNIT=1000000
heroku config:set --app ${PREFIX}-origin-ui-${STAGE} \
BACKEND_URL=https://${PREFIX}-origin-api-${STAGE}.herokuapp.com \
SUPPORTED_NETWORK_IDS=73799
BLOCKCHAIN_EXPLORER_URL=https://volta-explorer.energyweb.org