File tree 7 files changed +32
-7
lines changed
Compose/ProductionBuilder/Service
custom_cloud_custom_images
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
5
5
ENV FPM_HOST fpm
6
6
ENV FPM_PORT 9000
7
7
ENV UPSTREAM_HOST web
8
- ENV UPSTREAM_PORT 80
8
+ ENV UPSTREAM_PORT 8080
9
9
ENV MAGENTO_ROOT /app
10
10
ENV MAGENTO_RUN_MODE production
11
11
ENV MFTF_UTILS 0
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function getConfig(Config $config): array
62
62
'aliases ' => [$ config ->getHost ()]
63
63
]
64
64
],
65
- 'environment ' => [ ' UPSTREAM_HOST ' => $ this ->getBackendService ($ config )] ,
65
+ 'environment ' => $ this ->getBackendServiceUpstream ($ config ),
66
66
'ports ' => [
67
67
$ config ->getPort () . ':80 ' ,
68
68
$ config ->getTlsPort () . ':443 '
@@ -100,4 +100,24 @@ private function getBackendService(Config $config): string
100
100
? BuilderInterface::SERVICE_VARNISH
101
101
: BuilderInterface::SERVICE_WEB ;
102
102
}
103
+
104
+ /**
105
+ * @param Config $config
106
+ * @return string[]
107
+ * @throws ConfigurationMismatchException
108
+ */
109
+ private function getBackendServiceUpstream (Config $ config ): array
110
+ {
111
+ if ($ config ->hasServiceEnabled (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
+ }
103
123
}
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ services:
110
110
aliases :
111
111
- magento2.docker
112
112
environment :
113
- UPSTREAM_HOST : varnish
113
+ - UPSTREAM_HOST=varnish
114
+ - UPSTREAM_PORT=80
114
115
ports :
115
116
- ' 80:80'
116
117
- ' 443:443'
Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ services:
104
104
aliases :
105
105
- magento2.docker
106
106
environment :
107
- UPSTREAM_HOST : varnish
107
+ - UPSTREAM_HOST=varnish
108
+ - UPSTREAM_PORT=80
108
109
ports :
109
110
- ' 80:80'
110
111
- ' 4443:443'
Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ services:
104
104
aliases :
105
105
- magento2.docker
106
106
environment :
107
- UPSTREAM_HOST : varnish
107
+ - UPSTREAM_HOST=varnish
108
+ - UPSTREAM_PORT=80
108
109
ports :
109
110
- ' 80:80'
110
111
- ' 4443:443'
Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ services:
84
84
aliases :
85
85
- magento2.test
86
86
environment :
87
- UPSTREAM_HOST : varnish
87
+ - UPSTREAM_HOST=varnish
88
+ - UPSTREAM_PORT=80
88
89
ports :
89
90
- ' 8080:80'
90
91
- ' 443:443'
Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ services:
109
109
aliases :
110
110
- magento2.test
111
111
environment :
112
- UPSTREAM_HOST : varnish
112
+ - UPSTREAM_HOST=varnish
113
+ - UPSTREAM_PORT=80
113
114
ports :
114
115
- ' 8080:80'
115
116
- ' 443:443'
You can’t perform that action at this time.
0 commit comments