Commit b06d824b authored by MikeyMJCO's avatar MikeyMJCO

More complete "on your local machine" docs.

parent df54fefc
......@@ -104,26 +104,64 @@ You should be able to see the app at http://localhost:8080.
**Note**: the following steps are only useful and necessary for people looking after CiviCRM's documentation *infrastructure*. You don't need to do this if you just want to [contribute to documentation content](https://docs.civicrm.org/dev/en/master/documentation/).
1. Ensure that that you have [pip](https://packaging.python.org/en/latest/install_requirements_linux/#installing-pip-setuptools-wheel-with-linux-package-managers) (for python) and [composer](https://getcomposer.org/) (for php) installed..
2. [Install MkDocs](https://docs.civicrm.org/dev/en/master/documentation/#mkdocs). Ensure that MkDocs is installed as root so that it can be accessed from the src/publish.php script (typically invoked as https://docs.civicrm.org/publish.php)*
3. clone this repository to somewhere like /var/www/civicrm-docs and run `composer install`
```bash
$ git clone /var/www/civicrm-docs
$ cd /var/www/civicrm-docs
$ composer install
```
4. Set appropriate permissions on web/static
5. Configure an nginx virtual host
```bash
$ cd /etc/nginx/sites-enabled
$ ln -s /var/www/civicrm-docs/app/config/nginx.conf civicrm-docs
```
1. Install the pre-requisites:
**Note**: the example commands have been tested on Ubuntu 16.04 and 18.04.
* [nginx](https://nginx.org):
``` bash
sudo apt install nginx
```
* [mysql](https://mysql.com):
``` bash
sudo apt install mysql-server
```
* [php 7.1](https://php.net):
``` bash
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.1-fpm php7.1-mcrypt php7.1-mbstring php7.1-cli php7.1-xml php7.1-mysql php7.1-gd php7.1-imagick php7.1-recode php7.1-tidy php7.1-xmlrpc
```
* [pip](https://packaging.python.org/en/latest/install_requirements_linux/#installing-pip-setuptools-wheel-with-linux-package-managers):
``` bash
sudo apt install python-pip
```
* [composer](https://getcomposer.org)
``` bash
sudo apt install composer
```
* [mkdocs](https://mkdocs.org) *CiviCRM Docs Publisher expects MkDocs version 0.16.x*
``` bash
sudo -H pip install mkdocs==0.16.3
sudo -H pip install mkdocs-material==1.4.1
sudo -H pip install pygments==2.2.0
sudo -H pip install pymdown-extensions==2.0
```
**Note**: Ensure that MkDocs is installed as root so that it can be accessed from the src/publish.php script (typically invoked as https://docs.civicrm.org/publish.php)*
2. clone this repository to somewhere like /var/www/civicrm-docs and run `composer install`
```bash
git clone https://lab.civicrm.org/documentation/docs-publisher.git /var/www/civicrm-docs
cd /var/www/civicrm-docs
composer install
```
3. Set appropriate permissions on web/static
4. Update the nginx configuration file to point to the php7.1-fpm socket and fix the root.
[- root /var/www/web; -]
[+ root /var/www/civicrm-docs/web; +]
[- fastcgi_pass unix:/var/run/php-fpm.sock; -]
[+ fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; +]
5. Configure the nginx virtual host
```bash
cd /etc/nginx/sites-enabled
ln -s /var/www/civicrm-docs/app/config/civicrm-docs.conf civicrm-docs
```
6. Reload your nginx config and you should be up and running.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment