Obojobo is a Learning Module Management System
For local development, testing, and as a reference for the architecture setup, we have a Docker environment to get you up and running quickly.
The docker-compose setup will automatically set up the server containers, seed the database, and get everything up and running.
- Install Docker for Mac/Windows/Linux
- Install PHP Composer via https://getcomposer.org/download
- Run
composer install
- if you have git permission issues, configure your github ssh keys - Run
docker-compose up
- After up finishes, Run
docker-compose run --rm phpfpm php internal/update_password.php obojobo_admin
to generate the obojobo_admin user's password
- Unique domain or sub domain (obojobo.yourschool.edu)
- libjpeg
- libpng
- Nginx & PHPFPM (or Apache & mod_php)
- MySQL 5.5 or 5.6 database
- Memcached
- PHP 5.6 (with the following extensions)
- gd
- mbstring
- mycrypt
- mysql
- mysqlnd
- opcache
- pecl-memcache
- xml
- Install PHP Composer via https://getcomposer.org/download
- Configure your php.ini settings. (typically located in /etc/php5/php.ini or nearby)
- set
date.timezone
toAmerica/New_York
or whatever's appropriate - set
session.save_handler
to 'memcache' - set
session.save_path
tolocalhost:11211
(should be whatever your memcache server is running)
- Set a few php-fpm options (typically located in /etc/php-fpm.conf or /etc/php-fpm.d/*.conf)
- user = nginx
- group = nginx
security.limit_extensions
to.php
We have a handful of url routing settings unique to Obojobo that need to be configured into the webserver.
- Set up your Nginx config, typically located in /etc/nginx/nginx.conf or /etc/nginx/conf.d/*.conf
- Use the rules set in
internal/docker/nginx.conf
as a reference. Note the docker example is setup so that obojobo is the only site.
- Enable modrewrite
sudo a2enmod rewrite
- Use
internal/docker/apache-vhost.conf
to update your apache virtual hosts. Ve sure to adjust the domain matching and directories if needed sudo service apache2 restart
Keeping separate users for wordpress and obojobo tables helps to somewhat isolate data and permissions.
- Create 2 mysql users
obojobo_user
obojobo_wp_user
- Create 2 mysql databases
obojobo
obojobo_wordpress
- Give each user access to each database
GRANT ALL ON
obojobo.* TO 'obojobo_user'@'%';
GRANT ALL ON
obojobo_wordpress.* TO 'obojobo_wp_user'@'%';
FLUSH PRIVILEGES;
- Create tables and fill sample data
mysql -uroot -p < internal/docker/01_obojobo_tables.sql
mysql -uroot -p < internal/docker/02_obojobo_sampledata.sql
mysql -uroot -p < internal/docker/04_wordpress_tables.sql
mysql -uroot -p < internal/docker/05_wordpress_data.sql
- Update wordpress tables to match your domain. The sample data uses
http://localhost
, use a tool like https://rudrastyh.com/tools/sql-queries-generator to change that to your own domain.
- Git clone Obojobo
git clone [email protected]:ucfcdl/Obojobo.git /var/www/obojobo
- Install composer libraries: In the /var/www/obojobo and run
composer install
orphp composer.phar install
- Make sure the following directories are writable by the webserver user (usually nginx or www-user).
- internal/logs
- internal/media
- internal/templates/compiled
- Copy
/internal/config/cfgLocal.default.php
to/internal/config/cfgLocal.php
and customize
- Run through the options in cfgLocal.php for database connection info, paths, and hosts.
TBD