File tree Expand file tree Collapse file tree 7 files changed +32
-7
lines changed 
Compose/ProductionBuilder/Service 
custom_cloud_custom_images Expand file tree Collapse file tree 7 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ENV XDEBUG_HOST fpm_xdebug
55ENV  FPM_HOST fpm
66ENV  FPM_PORT 9000
77ENV  UPSTREAM_HOST web
8- ENV  UPSTREAM_PORT 80 
8+ ENV  UPSTREAM_PORT 8080 
99ENV  MAGENTO_ROOT /app
1010ENV  MAGENTO_RUN_MODE production
1111ENV  MFTF_UTILS 0
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function getConfig(Config $config): array
6262                        'aliases '  => [$ configgetHost ()]
6363                    ]
6464                ],
65-                 'environment '  => [ ' UPSTREAM_HOST '  =>  $ this getBackendService ($ config] ,
65+                 'environment '  => $ this getBackendServiceUpstream ($ config
6666                'ports '  => [
6767                    $ configgetPort () . ':80 ' ,
6868                    $ configgetTlsPort () . ':443 ' 
@@ -100,4 +100,24 @@ private function getBackendService(Config $config): string
100100            ? BuilderInterface::SERVICE_VARNISH 
101101            : BuilderInterface::SERVICE_WEB ;
102102    }
103+ 
104+     /** 
105+      * @param Config $config 
106+      * @return string[] 
107+      * @throws ConfigurationMismatchException 
108+      */ 
109+     private  function  getBackendServiceUpstream (Config $ configarray 
110+     {
111+         if  ($ confighasServiceEnabled (ServiceInterface::SERVICE_VARNISH )) {
112+             return  [
113+                 'UPSTREAM_HOST= '  . BuilderInterface::SERVICE_VARNISH ,
114+                 'UPSTREAM_PORT=80 ' 
115+             ];
116+         }
117+ 
118+         return  [
119+             'UPSTREAM_HOST= '  . BuilderInterface::SERVICE_WEB ,
120+             'UPSTREAM_PORT=8080 ' 
121+         ];
122+     }
103123}
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ services:
110110        aliases :
111111          - magento2.docker 
112112    environment :
113-       UPSTREAM_HOST : varnish 
113+       - UPSTREAM_HOST=varnish 
114+       - UPSTREAM_PORT=80 
114115    ports :
115116      - ' 80:80' 
116117      - ' 443:443' 
Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ services:
104104        aliases :
105105          - magento2.docker 
106106    environment :
107-       UPSTREAM_HOST : varnish 
107+       - UPSTREAM_HOST=varnish 
108+       - UPSTREAM_PORT=80 
108109    ports :
109110      - ' 80:80' 
110111      - ' 4443:443' 
Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ services:
104104        aliases :
105105          - magento2.docker 
106106    environment :
107-       UPSTREAM_HOST : varnish 
107+       - UPSTREAM_HOST=varnish 
108+       - UPSTREAM_PORT=80 
108109    ports :
109110      - ' 80:80' 
110111      - ' 4443:443' 
Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ services:
8484        aliases :
8585          - magento2.test 
8686    environment :
87-       UPSTREAM_HOST : varnish 
87+       - UPSTREAM_HOST=varnish 
88+       - UPSTREAM_PORT=80 
8889    ports :
8990      - ' 8080:80' 
9091      - ' 443:443' 
Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ services:
109109        aliases :
110110          - magento2.test 
111111    environment :
112-       UPSTREAM_HOST : varnish 
112+       - UPSTREAM_HOST=varnish 
113+       - UPSTREAM_PORT=80 
113114    ports :
114115      - ' 8080:80' 
115116      - ' 443:443' 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments