Cloud9 is now only available on amazon cloud. It is no longer easy to use the free service and as such, our development team is no longer using it.
This workspace was setup for Drupal 7 development. I have included all the software I regularily use during development; however, keep in mind this stack may not suit your development workflow. This Drupal7 workspace was setup with PostgreSQL rather then MySQL to aid in development of Tripal.
This workspace has the following installed:
- Ubuntu 14.04.5 LTS (trusty)
- Apache 2.4.7
- PHP 5.5.9
- PostgreSQL 9.3.15
- Drupal 7.55
- Drush 8.1.12
- PHP-daemon Library v2.0
- Tripal 3.x Development branch
- On your dashboard click "Create a new workspace."
- Enter workspace information
- Provide a name and description for your workspace.
- Under "Clone from Git or Mercurial URL (optional)" enter "https://github.com/UofS-Pulse-Binfo/drupal7-tripal3.git"
- Under "Choose a template" pick "Apache & PHP5"
- Click "Create Workspace."
- Install Drush
composer global require drush/drush:8.*
sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
source $HOME/.bashrc
- Click "Run Project" above to start apache2
- Update sites/default/default.settings.php as follows:
Scroll down to the line:
# base_url = 'http://www.example.com';
, remove the crosshatch (#), and replace the URL with the following:https://projectname-username.c9.io4
where you have replaced username with your own username and projectname with the name of your workspace.
- Install your Drupal site:
./create_fresh.sh
- In a new tab, open the Site URL and sign in using the credentials listed.
- Click "Run Project" above to start apache2
- Install your Drupal site:
./create_fresh.sh
- In a new tab, open the Site URL and sign in using the credentials listed.
The follow commands will shut down your site for the day. You're local files and database will be saved.
- Make sure all your changes have been committed (if appropriate) and pushed.
- Stop PostgreSQL:
sudo service postgresql stop
- Stop Apache: Click "Stop" above.
- Start Apache: Click "Run Project" above.
- Start PostgreSQL:
sudo service postgresql start
- Open your site as specified in the "Apache" tab.
- Apache Logs: ~/lib/apache2/log
Setting up Drush is easy; simply execute the following commands:
composer global require drush/drush:8.*
sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
source $HOME/.bashrc
This is due to Drupal trying to load certain stylesheets over HTTP and the page is loaded with HTTPS. To fix this by enabling SSL, go to the Terminal, and execute the following:
cd $HOME/workspace/sites/default
sudo vim settings.php
Scroll down to the line: # base_url = 'http://www.example.com';
, remove the crosshatch (#), and replace the URL with the following: https://projectname-username.c9.io4
where you have replaced username with your own username and projectname with the name of your workspace. Save the file and refresh your drupal site in the browser.