Difference between revisions of "ARK2/Install"

From ARK
Jump to: navigation, search
(Created page with "= Install = == Git / Github == Development is hosted on [https://github.com/lparchaeology Github], so you will need a free Github account to contribute code. If you are new...")
 
(Install)
Line 65: Line 65:
 
  <may need github token...>
 
  <may need github token...>
 
  cd build
 
  cd build
  ./console build:install
+
  ./build env:install
 
  <build frontend if needed>
 
  <build frontend if needed>
 
  cd ../bin
 
  cd ../bin
  ./console site:create <site>
+
  ./sysadmin site:create <site>
 
  <fix database load!>
 
  <fix database load!>
 
  cd ..
 
  cd ..
 
  ln -s sites/<site>/web  /Applications/MAMP/htdocs/<site>
 
  ln -s sites/<site>/web  /Applications/MAMP/htdocs/<site>
 
  http://localhost:8888/<site>
 
  http://localhost:8888/<site>

Revision as of 18:10, 9 January 2017

Install

Git / Github

Development is hosted on Github, so you will need a free Github account to contribute code.

If you are new to Git, you may find the Github desktop application easier to use. Alternatives are SourceTree and GitKraken.

Environment

To develop ARK requires the following tools to be installed:

You will also require PHP, a web server (Apache/PHP), a database server (MySQL/PostreSQL/SQLite), a web browser (Chrome/Firefox), and a an API client (Postman).

The following tools are recommend to adhere to ARK code quality standards:

  • php-cs-fixer
  • PHP CodeSniffer

macOS

On macOS, while you can install the requirements via standalone packages, we recommend using HomeBrew as it makes installing and updating all the tools used easier.

  • Install XCode
  • Install the Command Line Tools (includes Git)
  • Download and install HomeBrew
  • brew install homebrew/php/composer homebrew/completions/composer-completion homebrew/php/php-cs-fixer homebrew/php/php-code-sniffer homebrew/php/sqlformat homebrew/php/phplint
  • If you need to do front end development you will also need
    brew install node tidy-html5
  • (Optional) Modify your .profile to enable command-line auto-complete
export HOMEBREW_GITHUB_API_TOKEN="token"
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\u@\h \W$(__git_ps1 " (%s)") \$ '
export PATH=/Users/odysseus/.bin:/usr/local/bin:/usr/local/sbin:$PATH

NOTE add Homebrew to path!!!

The easiest way to run a webserver and database server is using MAMP. Simply install MAMP and create a soft-link from the MAMP webroot to the location of your ARK git repository. The alternative is to use HomeBrew to configure and run your own install. The HomeBrew method is recommended for developing with PostgreSQL (TODO).

  • brew install homebrew/php/php70 homebrew/php/php70-tidy homebrew/php/php70-xdebug

For QGIS Python:

  • 'brew install python qt pyqt'
  • 'pip install pep8 autopep8 jedi pb_tool '

TODO

  • xdebug setup
  • apache / php /mysql / mamp
  • linter/fixer rulesets

Debian Jessie

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install build-essential git nodejs php-codesniffer php5-intl libsodium13
curl -sS https://getcomposer.org/installer -o composer-setup.php
php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Install

git clone git@github.com:lparchaeology/ark2.git
cd ark2/
composer install
<may need github token...>
cd build
./build env:install
<build frontend if needed>
cd ../bin
./sysadmin site:create <site>
<fix database load!>
cd ..
ln -s sites/<site>/web  /Applications/MAMP/htdocs/<site>
http://localhost:8888/<site>