Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This is the server for automated updates of Joomla CMS instances running on joom
* Check out this repo
* 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
* Start the webserver and DB services: `docker-compose -f docker-compose.prod.yml up -d`
* Apply the database migrations: `docker-compose run --entrypoint="php artisan migrate" php`
* Daemonize the queue worker, i.e. by using supervisord; the call in question is: `docker-compose run --entrypoint="php artisan horizon" php`
* 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`
* Apply the database migrations: `docker-compose run --entrypoint="php artisan migrate" php-fpm`
* Daemonize the queue worker, i.e. by using supervisord; the call in question is: `docker-compose run --entrypoint="php artisan horizon" php-fpm`
* 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-fpm`

## Periodic operations
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.
Expand All @@ -21,7 +21,7 @@ The update server performs several operations automatically, if the the cron job

## Manual operations
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:
`docker-compose run --entrypoint="php artisan $COMMAND" php`
`docker-compose run --entrypoint="php artisan $COMMAND" php-fpm`

| Command | Description |
|--------------------------------|---------------------------------------------------------------------------------------------------------------------------|
Expand Down
3 changes: 3 additions & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@
'body' => substr((string) $e->getResponse()->getBody(), 0, 250)
]);
})->stop();

// We have jobs that will run into max attempts, don't write them to log
$exceptions->dontReport(\Illuminate\Queue\MaxAttemptsExceededException::class);
})->create();
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"guzzlehttp/guzzle": "^7.9.3",
"laravel/framework": "^11.46",
"laravel/horizon": "^5.29",
"laravel/octane": "^2.5",
"laravel/tinker": "^2.9",
"php-tuf/php-tuf": "1.0.1",
"spatie/cpu-load-health-check": "^1.0",
Expand Down
263 changes: 1 addition & 262 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,36 @@ services:
- MYSQL_USER=joomla
- MYSQL_PASSWORD=password
ports:
- '21002:3306'
- '127.0.0.1:21002:3306'
volumes:
- joomla-autoupdates-mariadb:/var/lib/mysql

redis:
image: redis
ports:
- "21003:6379"
- "127.0.0.1:21003:6379"

php:
webserver:
image: 'nginx:alpine'
working_dir: /application
volumes:
- './:/application'
- './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
ports:
- '127.0.0.1:21001:80'

php-fpm:
build:
context: .
context: docker/php-fpm
args:
UID: ${HOST_UID}
GID: ${HOST_GID}
entrypoint: php artisan octane:frankenphp --workers=1 --max-requests=1
ports:
- '21001:8000'
working_dir: /application
volumes:
- './:/application'
- './docker/php-fpm/php-ini-overrides.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini'
- './docker/php-fpm/php-ini-overrides.ini:/etc/php/8.3/cli/conf.d/99-overrides.ini'
- './docker/php-fpm/www.conf:/etc/php/8.3/fpm/pool.d/www.conf'

volumes:
joomla-autoupdates-mariadb:
Loading