AdamEr8 / cibus-budget-utilizer

MIT License
2 stars 0 forks source link

cibus-budget-utilizer

Prerequisites

  1. azd CLI - install
  2. az CLI - install
  3. func - azure functions core utils - install

Setup

git clone https://github.com/AdamEr8/cibus-budget-utilizer.git
cd cibus-budget-utilizer
az login
az account set --subscription < YOUR_SUBSCRIPTION_HERE >
azd init  # It will ask for environment name, write whatever you wish
azd up  # Here it will ask you for the subscription and RG where you want to create the azure function, the name of the function and your credentials
func azure functionapp publish < YOUR_FUNCION_APP_NAME_HERE >

Configurations

  1. main.bicep file holds several configs. If you change any, re-run setup from the top. You can configure the following values:
    1. "voucherGeneratorAlgo": 'Optimized' value will use one algo and 'Greedy' will use another voucher prices algo (Greedy if none provided).
    2. "allowOverdraft": If true, the minimum amount of out-of-pocket pay will be allowed when pruchasing coupons. If false, some cibus credit will remain and not be utilized.
    3. "maxVoucher": the maximum value of the vouchers you would like to have (shufersal doesn't respect partial vouchers so 200 shekels voucher might be inconvenient) the default is 100.
  2. In the function.json file, you can configure the timing of function trigger. For further info, see the official docs. If you make any changes, rerun func azure functionapp publish command as seen in setup mode.