Changes

167 bytes added ,  08:40, 19 November 2009
no edit summary
Line 17: Line 17:  
===Create user to run scripts===
 
===Create user to run scripts===
 
  sudo useradd -d /srv/activities activities
 
  sudo useradd -d /srv/activities activities
 +
 +
Make sure that all files in /srv/activities
 +
* has apache(web-data) user
 +
* ''activities'' group
 +
* group write access
 +
* umask is 002
 +
 +
===Switch to activities user===
 +
 +
sudo -i -u activities
    
===Checkout ASLO sources===
 
===Checkout ASLO sources===
   −
sudo -i -u activities
+
  git clone git://git.sugarlabs.org/slo-activities/mainline.git ~
  git clone git://git.sugarlabs.org/slo-activities/mainline.git /srv/activities
   
  git checkout production -b production
 
  git checkout production -b production
    
===Fetch external dependencies===
 
===Fetch external dependencies===
   −
sudo -i -u activities
+
  cd ~/site/vendors/
  cd /srv/activities/site/vendors/
   
  svn co http://svn.mozilla.org/libs/product-details
 
  svn co http://svn.mozilla.org/libs/product-details
 
  svn co http://svn.mozilla.org/libs/fizzypop.mozdev fizzypop
 
  svn co http://svn.mozilla.org/libs/fizzypop.mozdev fizzypop
Line 35: Line 43:  
===First-time ASLO setup===
 
===First-time ASLO setup===
   −
Using ''/srv/activities/aslo/config.php'' as template, setup ASLO settings in file ''/srv/activities/site/app/config/config.php''. Template file was configured for ''dev'' environment, switch it to production by  setting ''SITE_STATE'' variable to ''production''.
+
Using ''~/aslo/config.php'' as template, setup ASLO settings in file ''~/site/app/config/config.php''. Template file was configured for ''dev'' environment, switch it to production by  setting ''SITE_STATE'' variable to ''production''.
   −
Setup other env defines in file ''/srv/activities/site/app/config/config-local.php''
+
Setup other env defines in file ''~/site/app/config/config-local.php''
 
  define('DEBUG', 0);
 
  define('DEBUG', 0);
 
  define('DEV', false);
 
  define('DEV', false);
 
  define('QUERY_CACHE', true);
 
  define('QUERY_CACHE', true);
 +
 +
Create directories
 +
mkdir -p ~/site/app/tmp/cache/persistent
 +
mkdir -p ~/site/app/tmp/cache/models
 +
mkdir -p ~/site/app/tmp/cache/views
 +
mkdir -p ~/files/temp
 +
mkdir -p ~/files/extracted
    
Minify css/js stuff
 
Minify css/js stuff
  sudo -i -u activities
+
  ~/aslo/minify.py
/srv/activities/aslo/minify.py
      
Merge ASLO gettext strings
 
Merge ASLO gettext strings
  sudo -i -u activities
+
  ~/aslo/po-compile.sh
/srv/activities/aslo/po-compile.sh
      
===Crontab for activities user===
 
===Crontab for activities user===
   −
  @daily  /srv/activities/aslo/cron/daily
+
  @daily  $HOME/aslo/cron/daily
  @hourly /srv/activities/aslo/cron/hourly
+
  @hourly $HOME/aslo/cron/hourly
    
===Create vhost===
 
===Create vhost===