Deployment Setup
- also set up QueueProcessing using supervisord if you need to run the daemon in the background.
Site Customization
Sites are a mechanism to allow you to customize your install of Adhocracy. A site configuration can have custom CSS, html pages, logos and icons. After executing the setup-app command (see Configuration), a skeleton custom site has been created. It includes the following components:
- Static info pages inside the $SITE/page subdirectory.
- Static pages are named in the following pattern: NAME.LANGUAGE.html. This way, if a German user requests an Adhocracy page, the system will first check for a German version and, if necessary, fall back to the English page.
- By default, Adhocracy uses the following pages: index, about, imprint and privacy. You can add other pages and link to them at http://example.com/static/example.html.
- Custom CSS is included after the base CSS file and can be used to override layout details such as the color scheme. It is located at $SITE/static/style/site.css.
- A logo file can be placed at $SITE/static/img/header_logo.png. The logo file should roughly match the original format at 60x60 pixels.
Deploying on Apache
For any serious amount of requests, you should use the Apache web server instead of the Python built-in HTTP server. The following will describe how to set up Adhocracy using mod_wsgi.
Debian users - try this:
# apt-get install libapache2-mod-wsgi # a2enmod wsgi # apache2ctl restart
Everyone else: check the mod_wsgi web page
mod_wsgi will require a single Python program file to handle any requests coming from the web server. This file will have to contain path references to the actual Adhocracy codebase. During setup, a template of the launcher script was copied to $SITE/site.wsgi. Please edit this file to match your current environment.
Having done that, create an Apache configuration file. The following could be used as a template for a virtual host configuration:
<VirtualHost *:80> ServerAdmin support@example.com ServerName example.com ServerAlias *.example.com WSGIDaemonProcess adhocracy user=adhocracy group=adhocracy threads=25 WSGIProcessGroup adhocracy WSGIPassAuthorization On WSGIScriptReloading On WSGIReloadMechanism Process WSGIScriptAlias / /opt/adhocracy/example/site.wsgi ErrorLog /var/www/apache2/adhocracy-error.log LogLevel debug CustomLog /var/www/apache2/adhocracy-access.log combined ServerSignature On </VirtualHost>
More info:
