URI: 
       using docker for dev as its alot quicker - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit 1847885cde03343d8eef9035bc4cbe76d1a38149
   DIR parent f906e2822e33420c52e994b4e56cdaa2293780ec
  HTML Author: Jay Scott <jay@jayscott.co.uk>
       Date:   Tue, 19 Jul 2016 15:24:43 +0100
       
       using docker for dev as its alot quicker
       
       Diffstat:
         A Dockerfile                          |      26 ++++++++++++++++++++++++++
         M README.md                           |      35 +++++++++++++++++++++++--------
         D Vagrantfile                         |      14 --------------
         D hosts                               |       2 --
         D playbook.yml                        |       8 --------
         D roles/ansible-role-warvox/README.md |      33 -------------------------------
         D roles/ansible-role-warvox/defaults… |       8 --------
         D roles/ansible-role-warvox/handlers… |       2 --
         D roles/ansible-role-warvox/meta/mai… |      14 --------------
         D roles/ansible-role-warvox/tasks/ma… |      50 -------------------------------
         D roles/ansible-role-warvox/tasks/se… |      16 ----------------
         D roles/ansible-role-warvox/tests/in… |       2 --
         D roles/ansible-role-warvox/tests/te… |       5 -----
         D roles/ansible-role-warvox/vars/mai… |       2 --
         A setup.sh                            |      34 +++++++++++++++++++++++++++++++
       
       15 files changed, 86 insertions(+), 165 deletions(-)
       ---
   DIR diff --git a/Dockerfile b/Dockerfile
       @@ -0,0 +1,26 @@
       +FROM ruby:slim
       +MAINTAINER Jay Scott <jay@beardyjay.co.uk>
       +
       +RUN apt-get update && apt-get -y install \
       +  gnuplot \
       +  lame \
       +  build-essential \
       +  libssl-dev \
       +  libcurl4-openssl-dev \ 
       +  postgresql-contrib \
       +  git-core \
       +  curl \
       +  libpq-dev \
       +  && rm -rf /var/lib/apt/lists/*
       +
       +ADD . /home/warvox
       +ADD setup.sh /
       +
       +WORKDIR /home/warvox
       +RUN ln -s /usr/bin/ruby2.1 /usr/bin/ruby \
       +    && bundle install \
       +    && make
       +
       +EXPOSE 7777
       +
       +CMD ["/setup.sh"]
   DIR diff --git a/README.md b/README.md
       @@ -7,12 +7,12 @@ The latest version of this software is available from http://github.com/rapid7/w
        Questions and suggestions can be sent to:
         x(at)hdm(dot)io
        
       -Installing
       ---
       -WarVOX 2.0.0 is still in development and the installation process is not ideal at the moment.
       -
       -**DO NOT USE WARVOX 2.0.0-dev YET!**
       +#table of contents
       + - [Installing](#installing)
       + - [Development](#development)
        
       +#installing
       +--
        WarVOX requires a Linux operating system, preferably Ubuntu or Debian, but Kali should work as well.
        
        WarVOX requires PostgreSQL 9.1 or newer with the "contrib" package installed for integer array support.
       @@ -20,9 +20,9 @@ WarVOX requires PostgreSQL 9.1 or newer with the "contrib" package installed for
        To get started, install the OS-level dependencies:
        
                $ sudo apt-get install gnuplot lame build-essential libssl-dev libcurl4-openssl-dev \ 
       -          postgresql postgresql-contrib postgresql-common git-core curl libpq libpq-dev
       +          postgresql postgresql-contrib postgresql-common git-core curl libpq-dev
        
       -Install RVM to obtain Ruby 2.1.5 or later
       +Install RVM to obtain Ruby 2.2.3 or later
        
                $ \curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails
        
       @@ -30,9 +30,9 @@ After RVM is installed you need to run the rvm script provided
        
                $ source /usr/local/rvm/scripts/rvm
        
       -In case you have not installed Ruby 1.9.3 or later by now, do so using RVM.
       +In case you have not installed Ruby 2.2.3 or later by now, do so using RVM.
        
       -        $ rvm install ruby-2.1
       +        $ rvm install ruby-2.2.3
                
        Clone this repository to the location you want to install WarVOX:
        
       @@ -79,3 +79,20 @@ Start the WarVOX daemons:
        Access the web interface at http://127.0.0.1:7777/
        
        At this point you can configure a new IAX2 provider, create a project, and start making calls.
       +
       +### Development
       +
       +Using Docker
       +
       +Run a postgres container
       +
       +        docker pull postgres
       +        docker run -d --name=postgres postgres
       +
       +Build the image 
       +
       +        docker build -t warvox/test .
       +
       +Run the image 
       +
       +        docker run -p 7777:7777 -ti --link postgres:db warvox/test
   DIR diff --git a/Vagrantfile b/Vagrantfile
       @@ -1,14 +0,0 @@
       -# -*- mode: ruby -*-
       -# vi: set ft=ruby :
       -
       -VAGRANTFILE_API_VERSION = "2"
       -
       -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
       -  config.vm.synced_folder ".", "/home/warvox", type: "rsync"
       -  config.vm.box = "debian/jessie64"
       -  config.vm.network :private_network, ip: "192.168.60.4"
       -
       -  config.vm.provision "ansible" do |ansible|
       -    ansible.playbook = "playbook.yml"
       -  end
       -end
   DIR diff --git a/hosts b/hosts
       @@ -1,2 +0,0 @@
       -[warvox-app]
       -192.168.60.4
   DIR diff --git a/playbook.yml b/playbook.yml
       @@ -1,8 +0,0 @@
       ----
       -- hosts: all
       -  become: yes
       -  roles: 
       -    - ansible-role-warvox
       -  tasks:
       -
       -
   DIR diff --git a/roles/ansible-role-warvox/README.md b/roles/ansible-role-warvox/README.md
       @@ -1,33 +0,0 @@
       -Role Name
       -=========
       -
       -Provision warvox from source, rapid7/warvox.
       -
       -Requirements
       -------------
       -
       -No pre-requisites.
       -
       -Role Variables
       ---------------
       -
       -TBC
       -
       -Dependencies
       -------------
       -
       -No dependencies
       -
       -Example Playbook
       -----------------
       -
       -
       -License
       --------
       -
       -None
       -
       -Author Information
       -------------------
       -
       -Beardyjay
   DIR diff --git a/roles/ansible-role-warvox/defaults/main.yml b/roles/ansible-role-warvox/defaults/main.yml
       @@ -1,8 +0,0 @@
       ----
       -
       -rvm:
       -  url: https://get.rvm.io
       -  temp_installer_path: /tmp/rvm-installer.sh
       -  default_ruby_version: ruby-2.2.3
       -  root: "~/.rvm"
       -  init_script: "~/.rvm/scripts/rvm"
   DIR diff --git a/roles/ansible-role-warvox/handlers/main.yml b/roles/ansible-role-warvox/handlers/main.yml
       @@ -1,2 +0,0 @@
       ----
       -# handlers file for .
   DIR diff --git a/roles/ansible-role-warvox/meta/main.yml b/roles/ansible-role-warvox/meta/main.yml
       @@ -1,14 +0,0 @@
       -galaxy_info:
       -  author: Jay Scott
       -  description: Beardyjay
       -  license: NONE
       -  min_ansible_version: 1.3
       -  galaxy_tags:
       -    - warvox
       -    - voip
       -  platforms:
       -  - name: Debian
       -    versions:
       -      - jessie
       -dependencies: []
       -
   DIR diff --git a/roles/ansible-role-warvox/tasks/main.yml b/roles/ansible-role-warvox/tasks/main.yml
       @@ -1,50 +0,0 @@
       ----
       -
       -# Setup/install tasks.
       -- include: setup-RedHat.yml
       -  when: ansible_os_family == 'RedHat'
       -
       -- include: setup-Debian.yml
       -  when: ansible_os_family == 'Debian'
       -
       -  # RVM Install
       -- name: check for mpapis gpg key
       -  shell: gpg --list-keys mpapis
       -  become: false
       -  register: mpapis_gpg_key_exists
       -  ignore_errors: true
       -
       -- name: import GPG key
       -  shell: "curl -sSL https://rvm.io/mpapis.asc | gpg --import -"
       -  become: false
       -  when: mpapis_gpg_key_exists is defined and mpapis_gpg_key_exists.rc is defined and mpapis_gpg_key_exists.rc != 0 
       -
       -- name: download RVM
       -  get_url:
       -    url: "{{rvm.url}}"
       -    dest: "{{rvm.temp_installer_path}}"
       -
       -- name: set executable
       -  file:
       -    path: "{{rvm.temp_installer_path}}"
       -    mode: 0755
       -
       -- name: installing RVM 
       -  become: false
       -  command: "{{rvm.temp_installer_path}} --path {{rvm.root}} stable"
       -
       -- name: setting RVM autolibs
       -  become: false
       -  command: "{{rvm.root}}/bin/rvm autolibs 3"
       -
       -  # Ruby Install
       -- name: installing Ruby
       -  become: false
       -  command: "{{rvm.root}}/bin/rvm install {{rvm.default_ruby_version}}"
       -
       -- name: setting default Ruby
       -  shell: "source {{rvm.init_script}} && rvm use {{rvm.default_ruby_version}} --default executable=/bin/bash"
       -  become: false
       -  register: rvm_select_ruby_version_root
       -  ignore_errors: True
       -  changed_when: False
   DIR diff --git a/roles/ansible-role-warvox/tasks/setup-Debian.yml b/roles/ansible-role-warvox/tasks/setup-Debian.yml
       @@ -1,16 +0,0 @@
       -
       -- name: install warvox deps
       -  apt: "name={{ item }} state=installed"
       -  with_items:
       -    - gnuplot 
       -    - lame 
       -    - build-essential 
       -    - libssl-dev 
       -    - libcurl4-openssl-dev
       -    - postgresql 
       -    - postgresql-contrib 
       -    - postgresql-common 
       -    - git-core 
       -    - curl 
       -    - libpq-dev
       -    - sox
   DIR diff --git a/roles/ansible-role-warvox/tests/inventory b/roles/ansible-role-warvox/tests/inventory
       @@ -1 +0,0 @@
       -localhost
       -\ No newline at end of file
   DIR diff --git a/roles/ansible-role-warvox/tests/test.yml b/roles/ansible-role-warvox/tests/test.yml
       @@ -1,5 +0,0 @@
       ----
       -- hosts: localhost
       -  remote_user: root
       -  roles:
       -    - .
   DIR diff --git a/roles/ansible-role-warvox/vars/main.yml b/roles/ansible-role-warvox/vars/main.yml
       @@ -1,2 +0,0 @@
       ----
       -# vars file for .
   DIR diff --git a/setup.sh b/setup.sh
       @@ -0,0 +1,34 @@
       +#!/bin/bash
       +#
       +# based of a setup script by pandrew/metasploit
       +#
       +
       +VOXUSER="warvox"
       +VOXPASS="changeme"
       +
       +USEREXIST="$(psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='$VOXUSER'")"
       +if [[ ! $USEREXIST -eq 1 ]]
       +then
       +  psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -c "create role $VOXUSER WITH SUPERUSER login password '$VOXPASS'"
       +fi
       +
       +DBEXIST="$(psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres  postgres -l | grep warvox)"
       +if [[ ! $DBEXIST ]]
       +then
       +  psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -c "CREATE DATABASE warvox OWNER $VOXUSER;"
       +fi
       +
       +sh -c "echo 'production:
       +  adapter: postgresql
       +  database: warvox
       +  username: $VOXUSER
       +  password: $VOXPASS
       +  host: $DB_PORT_5432_TCP_ADDR
       +  port: 5432
       +  pool: 75
       +  timeout: 5' > /home/warvox/config/database.yml"
       +
       +cd /home/warvox 
       +make database
       +bin/adduser admin godsexlove
       +bin/warvox.rb --address 0.0.0.0