Update docs

This commit is contained in:
Dmitry Khomutov 2017-01-09 23:58:44 +07:00
parent caab13c393
commit 1139d28ddd
4 changed files with 21 additions and 11 deletions

View file

@ -6,9 +6,9 @@ Getting Started
* [Installing PHP Censor](installing.md) * [Installing PHP Censor](installing.md)
* [Adding a Virtual Host](virtual_host.md) * [Adding a Virtual Host](virtual_host.md)
* [Run Builds Using a Worker](workers/worker.md) * [Run builds using a worker](workers/worker.md)
* [Run Builds Using a Daemon](workers/daemon.md) * [Run builds using a daemon](workers/daemon.md)
* [Run Builds Using Cron](workers/cron.md) * [Run builds using cronjob](workers/cron.md)
* [Adding PHP Censor Support to Your Projects](config.md) * [Adding PHP Censor Support to Your Projects](config.md)
* [Setting up Logging](logging.md) * [Setting up Logging](logging.md)
* [Updating PHP Censor](updating.md) * [Updating PHP Censor](updating.md)

View file

@ -1,9 +1,9 @@
Run Builds Using Cron Run builds using cronjob
===================== ========================
Running builds using cron is a quick and simple method of getting up and running with PHP Censor. It also removes the need for PHP Censor to be running all the time. Running builds using cron is a quick and simple method of getting up and running with PHP Censor. It also removes the need for PHP Censor to be running all the time.
If you want a little more control over how PHP Censor runs, you may want to [set up the PHP Censor daemon](workers/daemon.md) instead. If you want a little more control over how PHP Censor runs, you may want to [set up the daemon](workers/daemon.md) instead.
Setting up the Cron Job Setting up the Cron Job
----------------------- -----------------------
@ -11,7 +11,17 @@ Setting up the Cron Job
You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following: You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following:
```sh ```sh
* * * * * /usr/bin/php /path/to/php-censor/bin/console php-censor:run-builds SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
* * * * * /path/to/php-censor/bin/console php-censor:run-builds
``` ```
**Note:** Make sure you change the `/path/to/php-censor` to the directory in which you installed PHP Censor, and update the PHP path if necessary. And for one running worker:
```sh
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
* * * * * flock -n /tmp/run-builds.lock --command '/path/to/php-censor/bin/console php-censor:run-builds'
```

View file

@ -1,11 +1,11 @@
Run Builds Using a Daemon Run builds using a daemon
========================= =========================
The PHP Censor daemon runs in the background on your server and continuously checks for new builds. Unless already running a build, the daemon should pick up and start running new builds within seconds of being created. The PHP Censor daemon runs in the background on your server and continuously checks for new builds. Unless already running a build, the daemon should pick up and start running new builds within seconds of being created.
The daemon is also useful if you want to run multiple PHP Censor workers in a virtualised environment (i.e. Docker) The daemon is also useful if you want to run multiple PHP Censor workers in a virtualised environment (i.e. Docker)
If you want to run PHP Censor builds on a regular schedule instead, you should [set up a cron-job](workers/cron.md). If you want to run PHP Censor builds on a regular schedule instead, you should [set up a cronjob](workers/cron.md).
Starting the Daemon Starting the Daemon
------------------- -------------------

View file

@ -1,4 +1,4 @@
Run Builds Using a Worker Run builds using a worker
========================= =========================
The PHP Censor Worker runs in the background on your server and waits for new builds to be added to a Beanstalkd queue. Unless already running a build, the worker will pick up and start running new builds almost immediately after their creation. The PHP Censor Worker runs in the background on your server and waits for new builds to be added to a Beanstalkd queue. Unless already running a build, the worker will pick up and start running new builds almost immediately after their creation.