Skip to content

Commit

Permalink
Merge pull request #29 from mbtamuli/fix_traefik_rule
Browse files Browse the repository at this point in the history
Fix Traefik rule in docker-compose template
  • Loading branch information
mrrobot47 authored Jun 11, 2018
2 parents 8ad9d16 + 9f77c79 commit 18ff99d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Site_Docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function generate_docker_compose_yml( array $filters = [] ) {
$nginx['image'] = array( 'name' => 'easyengine/nginx' );
$nginx['depends_on'] = array( 'name' => 'php' );
$nginx['restart'] = $restart_default;
$v_host = in_array( 'wpsubdom', $filters ) ? 'VIRTUAL_HOST=${VIRTUAL_HOST},HostRegexp:{subdomain:.+}.${VIRTUAL_HOST}' : '${VIRTUAL_HOST}';
$v_host = in_array( 'wpsubdom', $filters ) ? 'HostRegexp:{subdomain:.+}.${VIRTUAL_HOST},${VIRTUAL_HOST}' : 'Host:${VIRTUAL_HOST}';

$nginx['labels'] = array(
'label' => array(
Expand All @@ -75,7 +75,7 @@ public function generate_docker_compose_yml( array $filters = [] ) {
array( 'name' => 'traefik.protocol=http' ),
array( 'name' => 'traefik.docker.network=site-network' ),
array( 'name' => "traefik.frontend.entryPoints=$frontend_entrypoints" ),
array( 'name' => "traefik.frontend.rule=Host:$v_host" ),
array( 'name' => "traefik.frontend.rule=$v_host" ),
),
);
$nginx['volumes'] = array(
Expand Down

0 comments on commit 18ff99d

Please sign in to comment.