Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Docker for Drupal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Composer
plugin
Docker for Drupal
Commits
f2ed160e
Commit
f2ed160e
authored
2 years ago
by
jurgenhaas
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into 'main'
Merging develop into main See merge request
!13
parents
12c54cec
65e9d5ff
No related branches found
Branches containing commit
Tags
v3.7.26
Tags containing commit
1 merge request
!13
Merging develop into main
Pipeline
#523011
passed
2 years ago
Stage: test
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Handler.php
+12
-3
12 additions, 3 deletions
src/Handler.php
templates/crontabs/template.twig
+7
-1
7 additions, 1 deletion
templates/crontabs/template.twig
templates/docker-compose.yml.twig
+6
-30
6 additions, 30 deletions
templates/docker-compose.yml.twig
with
25 additions
and
34 deletions
src/Handler.php
+
12
−
3
View file @
f2ed160e
...
...
@@ -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
))
{
...
...
This diff is collapsed.
Click to expand it.
templates/crontabs/template.twig
+
7
−
1
View file @
f2ed160e
{%
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
%}
This diff is collapsed.
Click to expand it.
templates/docker-compose.yml.twig
+
6
−
30
View file @
f2ed160e
...
...
@@ -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
}}
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment