Skip to content

Commit

Permalink
Merge pull request #169 from dhsathiya/add-sysctls
Browse files Browse the repository at this point in the history
Add sysctl parameters in site type WP
  • Loading branch information
mrrobot47 committed Aug 6, 2020
2 parents ee486d0 + 8e14877 commit 9f06400
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Site_WP_Docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use function EE\Utils\mustache_render;
use function EE\Site\Utils\get_ssl_policy;
use function EE\Site\Utils\sysctl_parameters;

class Site_WP_Docker {

Expand Down Expand Up @@ -60,6 +61,7 @@ public function generate_docker_compose_yml( array $filters = [], $volumes ) {
[ 'name' => 'MYSQL_PASSWORD' ],
],
];
$db['sysctls'] = sysctl_parameters();
$db['networks'] = $network_default;
}
// PHP configuration.
Expand Down Expand Up @@ -101,6 +103,8 @@ public function generate_docker_compose_yml( array $filters = [], $volumes ) {
],
];

$php['sysctls'] = sysctl_parameters();

$php['networks'] = [
'net' => [
[
Expand Down Expand Up @@ -160,6 +164,9 @@ public function generate_docker_compose_yml( array $filters = [], $volumes ) {
'name' => 'io.easyengine.site=${VIRTUAL_HOST}',
],
];

$nginx['sysctls'] = sysctl_parameters();

$nginx['networks'] = [
'net' => [
[ 'name' => 'global-frontend-network' ],
Expand Down Expand Up @@ -218,6 +225,7 @@ public function generate_docker_compose_yml( array $filters = [], $volumes ) {
'name' => 'io.easyengine.site=${VIRTUAL_HOST}',
],
];
$redis['sysctls'] = sysctl_parameters();
$redis['networks'] = $network_default;

$base[] = $php;
Expand Down
6 changes: 6 additions & 0 deletions templates/docker-compose.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ services:
- {{name}}
{{/env}}
{{/environment}}
{{#sysctls}}
sysctls:
{{#sysctl}}
- {{name}}
{{/sysctl}}
{{/sysctls}}
external_links:
- services_global-nginx-proxy_1:${VIRTUAL_HOST}
{{#networks}}
Expand Down

0 comments on commit 9f06400

Please sign in to comment.