Skip to content
Snippets Groups Projects
Commit f2ed160e authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'develop' into 'main'

Merging develop into main

See merge request !13
parents 12c54cec 65e9d5ff
No related branches found
Tags v3.7.26
1 merge request!13Merging develop into main
Pipeline #523011 passed
......@@ -550,7 +550,7 @@ class Handler extends BaseHandler {
$activeTasks = [];
foreach ($tasks as $name => $task) {
$disabled = !empty($task['disabled']);
$command = $task['command'];
$ping_url = FALSE;
if (isset($hj_manager)) {
unset($task['disabled'], $task['command']);
$task['name'] = $name;
......@@ -601,11 +601,20 @@ class Handler extends BaseHandler {
}
}
if ($check) {
$command .= ' && curl -fsS --retry 5 -o /dev/null ' . $check['ping_url'];
$ping_url = $check['ping_url'];
}
}
if (!$disabled) {
$activeTasks[] = $task['schedule'] . ' ' . $command;
if (count(explode(' ', $task['schedule'])) === 5) {
// Add leading "*" for seconds.
$task['schedule'] = '* ' . $task['schedule'];
}
$activeTasks[] = [
'name' => $task['name'],
'schedule' => $task['schedule'],
'command' => $task['command'],
'ping_url' => $ping_url,
];
}
}
if (empty($activeTasks)) {
......
{% for line in loopoptions|default([]) %}
{{ line|raw }}
[job-exec "{{ line.name }}"]
no-overlap = true
schedule = {{ line.schedule }}
container = {{ projectname }}-php-1
command = {{ line.command }}{% if line.ping_url %} && curl -fsS --retry 5 -o /dev/null {{ line.ping_url }}{% endif %}
{% endfor %}
......@@ -90,6 +90,9 @@ services:
- {{ projectroot }}/drush:/etc/drush
{% if drupal.live|default(0) %}
- {{ projectrootfiles }}:/data/default
{% if backup.enable|default(0) %}
- {{ projectrootfiles }}/db:/var/backups/mysql
{% endif %}
{% endif %}
{% if php.ssh and not drupal.live|default(0) %}
- {{ php.ssh_auth_sock }}:/ssh-agent
......@@ -108,40 +111,13 @@ services:
{% if crontabs.enable|default(0) %}
cron:
image: 'wodby/drupal-php:{{ php.version }}'
image: mcuadros/ofelia:latest
restart: unless-stopped
environment:
{% if mailhog.enable %}
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
{% endif %}
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
COMPOSER_ALLOW_SUPERUSER: 1
{% if php.ssh and not drupal.live|default(0) %}
SSH_AUTH_SOCK: /ssh-agent
{% endif %}
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}:/var/www/html
- {{ projectroot }}/drush:/etc/drush
- {{ projectrootfiles }}:/data/default
- {{ projectroot }}/crontabs:/etc/crontabs
{% if php.ssh and not drupal.live|default(0) %}
- {{ php.ssh_auth_sock }}:/ssh-agent
{% endif %}
{% if backup.enable|default(0) %}
- {{ projectrootfiles }}/db:/var/backups/mysql
{% endif %}
extra_hosts:
- '{{ projectdomain }}:{{ docker0.ip }}'
{% for subdomain in relatedprojectdomains %}
- '{{ subdomain }}:{{ docker0.ip }}'
{% endfor %}
command: sudo -E crond -f -d 0
- /var/run/docker.sock:/var/run/docker.sock:ro
- {{ projectroot }}/crontabs:/etc/ofelia/config.ini
{% endif %}
{{ webserver.type }}:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment