Public Repository

Last pushed: a year ago
Short Description
Example policy server to use with a pexip.com deployment
Full Description

This is an example policy server that can be used to provide avatars and service configuration to a pexip mcu deployment. It's a python twisted server that stores configuration in a redis db. There is a simple angularjs administration interface available at ianmorty/policy-ui. The services can also be fronted with a reverse proxy e.g. jwilder/nginx-proxy

Example run command:

docker run -d -e "VIRTUAL_HOST=policy.local" -t -i ianmorty/policy /sbin/my_init -- bash -l

Where policy.local will resolve to the IP of the docker host (if using boot2docker, run boot2docker ip to see the actual IP used)

Editing your local hosts file is usually sufficient to get this working along with the suggested reverse proxy command:

docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy and then visiting ui.local in your browser.

You can optionally connect to an LDAP server to lookup avatars too. Simply add your credentials and search/base dn via environment variables as follows:

  • LDAP_SERVER_ADDRESS
  • LDAP_USERNAME
  • LDAP_PASSWORD
  • LDAP_BASE_DN (default: ou=People,dc=pexip,dc=local)
  • LDAP_SEARCH_FIELD (default telephoneNumber)
  • LDAP_IMAGE_FIELD (default thumbnailPhoto)

e.g.

docker run -d -e "VIRTUAL_HOST=policy.local" -e "LDAP_SERVER_ADDRESS=ldaps://127.0.0.1" -e "LDAP_USERNAME=PEXIP\bob" -e "LDAP_PASSWORD=footle" -t -i ianmorty/policy /sbin/my_init -- bash -l

Take a test drive at pexip.com/drive to try it out

The MIT License (MIT)

Copyright (c) 2015 Ian Mortimer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Docker Pull Command
Owner
ianmorty