Skip to content

Latest commit

 

History

History
97 lines (49 loc) · 1.91 KB

README.md

File metadata and controls

97 lines (49 loc) · 1.91 KB

To get started there are two options.

  1. Using docker. (If you got docker installed)

  2. Manual set up.

####Set up via docker

docker-compose up

####Manual setup.

Requirements.

  • install virtual env

      sudo pip3 install virtualenv
    
  • Create the virtual environment

      virtualenv .pycon_venv
      
      # (This command is specifying the version of python to use when creating the virtual env)
      virtualenv  .pycon_venv 
    
  • Activate the virtual env

    source .pycon_venv/bin/activate

  • Install USSD airflow and its dependencies

    pip install -r requirements.txt

  • Apply the migrations created.

    python manage.py migrate

  • Verify screens are valid.

    python manage.py validate_ussd_journey ./register_app/customer-journey.yml

  • Run the server

    python manage.py runserver 8000

Deploying

For this workshop we recommend either of the following options

1. Using ngrok to serve youer application locally 

2. Deploying to heroku

####Configuring ngrok (Ngrok will be used route USSD traffic from your phone to the USSD server we have just runned)

  • Download ngrok from https://ngrok.com/download

  • Unzip ngrok unzip /path/to/ngrok.zip

  • Run ngrok

      ./ngrok  http  8000  
      #If you are running the server on a different port. Use that port here. 
    

Deploying to heroku

    heroku login
    heroku create
    
    # deploying command
    git push heroku master

##Obtaining a short code.

Copy the URL generated by Ngrok. Sample URL Sample URL http://b58131f5.ngrok.io Either http or https is fine

Using your browser visit http://nginx.africastalking-ussd-routing.fb8146d3.svc.dockerapp.io/

Post the URL generated by ngrok to receive a short code

Dial via you cell phone and interact with the menus that you have created.