public
Description: OneBody is free, open-source, web-based social networking and online directory software for churches.
Home | Edit | New

DebianPackage

See InstallViaAptitude for installation instructions.

This page documents some of the logic behind the process used to package OneBody as a Debian (deb) package, how the directories are layed out, etc.

Directory Layout

Path Description
/usr/lib/onebody main application files of OneBody
/var/lib/onebody database files, e.g. email attachments, picture files, etc.
/var/log/onebody logs
/var/cache/onebody cache files
/etc/onebody configuration files
/usr/bin/setup-onebody script used to setup external software for use by OneBody, e.g. Postfix, MySQL, etc.

Running Commands

The web app runs as the user onebody, but you cannot log in as that user. To run database migrations, rake tasks, or other scripts as the onebody user (which you should always), use the sudo command like this:

sudo -u onebody COMMAND

Also, you’ll need to tell Rails which environment to work in, which will almost certainly be “production.” To specify that for Rake tasks, specify it like so:

RAKE_COMMAND RAILS_ENV=production

So, putting it all together, the onebody:settings rake task (see RakeTasks) would be executed like so:

cd /usr/lib/onebody
sudo -u onebody rake onebody:sites RAILS_ENV=production

The console can be run with this command (RAILS_ENV isn’t needed for this script — just pass the environment as the last arg):

sudo -u onebody script/console production

Creating the Deb File

Use the onebody:deb rake task to build a deb file.

To change the version prior to building the package, modify the VERSION file in the root of the OneBody directory.

rake onebody:deb
Last edited by seven1m, Mon Oct 19 14:23:17 -0700 2009
Home | Edit | New
Versions: