Skip to content

Commit f9b4508

Browse files
committed
improve readme
1 parent d6068c1 commit f9b4508

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
11
# Joomla Automated Updates Server
22
This is the server for automated updates of Joomla CMS instances running on joomla.org
33

4-
# Deployment and usage
4+
## Deployment
55
* Install docker and docker compose
66
* Check out this repo
77
* Copy to .env.example to .env and adjust to your requirements - important: set UID and GID to user and group on the host system that you would like to use for the processes
88
* Start the webserver and DB services: `docker-compose -f docker-compose.prod.yml up -d`
99
* Apply the database migrations: `docker-compose run --entrypoint="php artisan migrate" php`
10-
* Daemonize the queue worker using supervisord; the call in question is: `docker-compose run --entrypoint="php artisan horizon" php`
10+
* Daemonize the queue worker, i.e. by using supervisord; the call in question is: `docker-compose run --entrypoint="php artisan horizon" php`
1111
* Add a cron job to execute the task scheduler. The scheduler should be trigger every 5min, the call is: `docker-compose run --entrypoint="php artisan schedule:run" php`
1212

13+
## Periodic operations
14+
The update server performs several operations automatically, if the the cron job is configured. Each operation is a artisan console job and can be manually performed if necessary.
15+
16+
| Rhythm | Command | Description |
17+
|------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
18+
| Every six hours | app:cleanup-sites-list | Clean sites that didn't have a successful health check call in the last 7 days |
19+
| Every 15 minutes | app:queue-health-checks | Retrieves a list of sites that are pending for their health check (currently defined as "last checked more than 24 hours ago") and pushed the individual check jobs into the queue; if a pending update is detected during a check, it will be executed automatically. |
20+
| Daily | queue:prune-failed | Removes failed jobs from the laravel job queue; failed updates and their details are logged in the updates table anyways |
21+
22+
## Manual operations
23+
The update server has multiple manual operations available that can be triggered via CLI. In order to do so, execute the respective command in the PHP container of the docker setup:
24+
`docker-compose run --entrypoint="php artisan $COMMAND" php`
25+
26+
| Command | Description |
27+
|--------------------------------|---------------------------------------------------------------------------------------------------------------------------|
28+
| app:check-site-health {siteId} | Runs a health check for a given site ID. |
29+
| app:perform-update {siteId} | Runs an update job for a given site ID. |
30+
| app:queue-updates | Triggers update jobs for a given number of sites. Runs in interactive mode and queries target version and number of sites |
31+
32+
## Queue Monitoring
33+
A monitoring dashboard for the queue is available on the selected HTTP port via `domain.tld/horizion`. It's protected with basic auth, credentials are defined in the .env file.

0 commit comments

Comments
 (0)