Snippets

Ian Geiser How To Configure Cloud9 for ownCloud Development

Updated by Ian Geiser

File ocdev-w-c9.md Modified

  • Ignore whitespace
  • Hide word diff
 sudo /etc/init.d/php5-fpm stop
 ```
 
-* Add custom settings for owncloud in the ```/etc/php/```
+* Add custom settings for the php cli
 
 ```
 cat << EOF | sudo tee /etc/php5/cli/conf.d/99-ocs.ini
Updated by Ian Geiser

File ocdev-w-c9.md Modified

  • Ignore whitespace
  • Hide word diff
 * Add custom settings for owncloud in the ```/etc/php/```
 
 ```
-cat < EOF | sudo tee /etc/php5/cli/conf.d/99-ocs.ini
+cat << EOF | sudo tee /etc/php5/cli/conf.d/99-ocs.ini
 default_charset = UTF-8
 output_buffering = off
 EOF
Created by Ian Geiser

File ocdev-w-c9.md Added

  • Ignore whitespace
  • Hide word diff
+#How To Configure Cloud9 for ownCloud Development
+
+* Create a "Custom" project on c9.io
+
+* In the custom workspace add the php dependencies:
+
+```
+sudo apt-get update
+sudo apt-get install php5-sqlite php5-curl phpunit
+```
+* The php installs will cause apache to restart so they need to be stopped again.
+
+```
+sudo /etc/init.d/apache2 stop
+sudo /etc/init.d/php5-fpm stop
+```
+
+* Add custom settings for owncloud in the ```/etc/php/```
+
+```
+cat < EOF | sudo tee /etc/php5/cli/conf.d/99-ocs.ini
+default_charset = UTF-8
+output_buffering = off
+EOF
+
+```
+
+* Edit the ```~/.ocdevrc``` so that it has sane defaults for your project
+   See https://github.com/owncloud/ocdev for details on the **ocdev** tool.
+
+* Install the ocdev utility
+
+```
+sudo pip3 install ocdev
+```
+
+* Setup the ocdev environment in the home directory **not ~/workspace**
+
+```
+cd $HOME
+ocdev setup core
+mkdir -p core/data
+```
+
+* Start your awesome application
+
+```
+cd $HOME
+ocdev startapp MyApp
+```
+
+* Move the app template into your workspace so it is the only thing that is managed by your c9 project.
+
+```
+mv myapp/* ~/workspace
+mv myapp/.* ~/workspace
+rmdir MyApp
+``` 
+
+* Then link the application into the right place in the ownCloud apps directory
+
+```
+ln -s $HOME/workspace $HOME/core/apps/MyApp
+```
+
+*  Setup the runner for live previews using the "Run -> Run With -> Shell Command" and set command to: ```php -S $IP:$PORT -t $HOME/core```
+
+* Now you are ready to get some code done!
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.