Version 2 (modified by 15 years ago) ( diff ) | ,
---|
Setting up a development environment for the Collaborative Democracy Workshop software
The collaborative democracy workshop uses a web application to facilitate its process. That web application is under regular development, and we welcome contributions and collaboration from interested developers. This page describes how to set up a development environment. It often assumes you're running a debian-derived variant of the GNU/Linux operating system. If you have another development environment you'd like to see documented, feel free to add instructions for that environment here.
setting up the dependencies
Make sure you have installed subversion, php5, sqlite, and a web server of your choice (most folks use apache, but there are lots of other ways to go). On a debian-derived system, you could do:
sudo aptitude install libapache2-mod-php5 php5-sqlite subversion apache2 sqlite3
check out a working copy of the software
This example puts the software in /srv/ir
, but you can put it wherever makes sense to you (remember that the web server should be able to get to it).
sudo mkdir -p /srv/ir sudo chown $(whoami) /srv/ir svn co https://svn.mayfirst.org/mfpl/trunk/ir /srv/ir
(note that the subversion repository's TLS certificate is currently signed by the May First/People Link certificate authority, and has an SHA1 fingerprint of 1D:88:9F:17:15:A1:B1:B6:11:FD:A5:67:08:D9:89:68:BD:C8:D0:DD
)
setting up a name-based virtual host
pick a virtual host name where this software will run, and bind it to a local loopback IP address that your web server is listening on. I've chosen the name ir.test
, and i'm binding to 127.0.2.1:
sh -c 'echo 127.0.2.1 ir.test >> /etc/hosts'
Tell your web server to respond to that hostname based on the filesystem tree found at /srv/ir/web
. For apache2 on debian, you can do this by putting the following file in /etc/apache2/sites-available/ir.test
(in other distributions, you may need to insert this information elsewhere into the apache config):
<VirtualHost *:80> ServerAdmin webmaster@mayfirst.org ServerName ir.test DocumentRoot /srv/ir/web <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /srv/ir/web> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel info CustomLog /var/log/apache2/access.log combined </VirtualHost>
On debian systems, you would enable this virtual host with:
sudo a2ensite ir.test
Create the sqlite database
The sqlite database needs to be in a directory writable by the web server. Here's a way to do that with debian:
touch /srv/ir/db/db.sqlite sudo chgrp -R www-data /srv/ir/db chmod -R g+rwx /srv/ir/db
Setting up the configuration
Now you need to configure the web application:
cp /srv/ir/docs/conf.php.sample /srv/ir/conf.php
Edit the contents of /srv/ir/conf.php
to point to the correct source directory, and the actual database you've set up. You'll need to set an end time for your workshop, and choose distinct group and monkey passwords for each room you've designated.
testing it out
Point your web browser at http://ir.test/ and run with it!