Source

sprintsite / components / nginx / component.py

Full commit
from batou.component import Component, platform
from batou.lib.file import File
from batou.utils import Address


class Nginx(Component):

    # Set via environment
    server_name = 'localhost'

    def configure(self):
        self.address = Address(self.server_name, 80)
        self.haproxy = self.require('haproxy')[0]
        self += File('sprintsite.conf', is_template=True)


@platform('gocept.net', Nginx)
class SystemwideNginx(Component):

    def configure(self):
        # copy all .conf files in workingdir to /etc/nginx/local
        # trigger sudo /etc/init.d/nginx reload
        pass