File tree Expand file tree Collapse file tree 12 files changed +280
-17
lines changed
ProductionBuilder/Service/Database
_files/cloud_base_developer Expand file tree Collapse file tree 12 files changed +280
-17
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ interface BuilderInterface
4848 public const VOLUME_MAGENTO_DB_QUOTE = 'magento-db-quote ' ;
4949 public const VOLUME_MAGENTO_DB_SALES = 'magento-db-sales ' ;
5050 public const VOLUME_MAGENTO_DEV = './dev ' ;
51- public const VOLUME_DOCKER_ETRYPOINT = '.docker/mysql/docker-entrypoint-initdb.d ' ;
52- public const VOLUME_DOCKER_ETRYPOINT_QUOTE = '.docker/mysql-quote/docker-entrypoint-initdb.d ' ;
53- public const VOLUME_DOCKER_ETRYPOINT_SALES = '.docker/mysql-sales/docker-entrypoint-initdb.d ' ;
51+ public const VOLUME_DOCKER_ENTRYPOINT = '.docker/mysql/docker-entrypoint-initdb.d ' ;
52+ public const VOLUME_DOCKER_ENTRYPOINT_QUOTE = '.docker/mysql-quote/docker-entrypoint-initdb.d ' ;
53+ public const VOLUME_DOCKER_ENTRYPOINT_SALES = '.docker/mysql-sales/docker-entrypoint-initdb.d ' ;
5454
5555 public const SYNC_ENGINE_NATIVE = 'native ' ;
5656
Original file line number Diff line number Diff line change 77
88namespace Magento \CloudDocker \Compose ;
99
10- use Magento \CloudDocker \App \ConfigurationMismatchException ;
1110use Magento \CloudDocker \Compose \Php \ExtensionResolver ;
1211use Magento \CloudDocker \Config \Config ;
1312use Magento \CloudDocker \Config \Environment \Converter ;
@@ -97,14 +96,6 @@ public function build(Config $config): Manager
9796 $ volumes = [$ volumePrefix . self ::VOLUME_MAGENTO_SYNC . ': ' . self ::DIR_MAGENTO . ':nocopy ' ];
9897 }
9998
100- if ($ config ->hasMariaDbConf ()) {
101- $ volumesList [$ volumePrefix . self ::VOLUME_MARIADB_CONF ] = [];
102- }
103-
104- if ($ config ->hasDbEntrypoint ()) {
105- $ volumesList [self ::VOLUME_DOCKER_ETRYPOINT ] = [];
106- }
107-
10899 $ manager ->setVolumes ($ volumesList );
109100
110101 /**
@@ -129,11 +120,11 @@ public function build(Config $config): Manager
129120 ];
130121
131122 if ($ config ->hasMariaDbConf ()) {
132- $ dbVolumes [] = $ volumePrefix . self ::VOLUME_MARIADB_CONF . ':/etc/mysql/mariadb.conf.d ' ;
123+ $ dbVolumes [] = self ::VOLUME_MARIADB_CONF . ':/etc/mysql/mariadb.conf.d ' ;
133124 }
134125
135126 if ($ config ->hasDbEntrypoint ()) {
136- $ dbVolumes [] = self ::VOLUME_DOCKER_ETRYPOINT . ':/docker-entrypoint-initdb.d ' ;
127+ $ dbVolumes [] = self ::VOLUME_DOCKER_ENTRYPOINT . ':/docker-entrypoint-initdb.d ' ;
137128 }
138129
139130 $ manager ->updateService (self ::SERVICE_DB , [
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ private function getMounts(Config $config): array
118118 $ mounts [] = $ config ->getNameWithPrefix () . BuilderInterface::VOLUME_MAGENTO_DB . ':/var/lib/mysql ' ;
119119
120120 if ($ config ->hasDbEntrypoint ()) {
121- $ mounts [] = BuilderInterface::VOLUME_DOCKER_ETRYPOINT . ':/docker-entrypoint-initdb.d ' ;
121+ $ mounts [] = BuilderInterface::VOLUME_DOCKER_ENTRYPOINT . ':/docker-entrypoint-initdb.d ' ;
122122 }
123123
124124 return $ mounts ;
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ private function getMounts(Config $config): array
113113 }
114114
115115 $ mounts [] = BuilderInterface::VOLUME_MAGENTO_DB_QUOTE . ':/var/lib/mysql ' ;
116- $ mounts [] = BuilderInterface::VOLUME_DOCKER_ETRYPOINT_QUOTE . ':/docker-entrypoint-initdb.d ' ;
116+ $ mounts [] = BuilderInterface::VOLUME_DOCKER_ENTRYPOINT_QUOTE . ':/docker-entrypoint-initdb.d ' ;
117117
118118 return $ mounts ;
119119 }
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ private function getMounts(Config $config): array
113113 }
114114
115115 $ mounts [] = BuilderInterface::VOLUME_MAGENTO_DB_SALES . ':/var/lib/mysql ' ;
116- $ mounts [] = BuilderInterface::VOLUME_DOCKER_ETRYPOINT_SALES . ':/docker-entrypoint-initdb.d ' ;
116+ $ mounts [] = BuilderInterface::VOLUME_DOCKER_ENTRYPOINT_SALES . ':/docker-entrypoint-initdb.d ' ;
117117
118118 return $ mounts ;
119119 }
Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ public function buildDataProvider(): array
7979 [CliSource::OPTION_WITH_MARIADB_CONF , true ]
8080 ]
8181 ],
82+ 'cloud-base-developer ' => [
83+ __DIR__ . '/_files/cloud_base_developer ' ,
84+ [
85+ [CliSource::OPTION_MODE , BuilderFactory::BUILDER_DEVELOPER ],
86+ [CliSource::OPTION_WITH_ENTRYPOINT , true ],
87+ [CliSource::OPTION_WITH_MARIADB_CONF , true ]
88+ ]
89+ ],
8290 'cloud-base-mftf ' => [
8391 __DIR__ . '/_files/cloud_base_mftf ' ,
8492 [
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return [
4+ 'MAGENTO_CLOUD_RELATIONSHIPS' => base64_encode(json_encode([
5+ 'database' => [
6+ [
7+ 'host' => 'db',
8+ 'path' => 'magento2',
9+ 'password' => 'magento2',
10+ 'username' => 'magento2',
11+ 'port' => '3306'
12+ ]
13+ ],
14+ 'redis' => [
15+ [
16+ 'host' => 'redis',
17+ 'port' => '6379'
18+ ]
19+ ],
20+ 'elasticsearch' => [
21+ [
22+ 'host' => 'elasticsearch',
23+ 'port' => '9200'
24+ ]
25+ ]
26+ ])),
27+ 'MAGENTO_CLOUD_ROUTES' => base64_encode(json_encode([
28+ 'http://magento2.docker/' => [
29+ 'type' => 'upstream',
30+ 'original_url' => 'http://{default}'
31+ ],
32+ 'https://magento2.docker/' => [
33+ 'type' => 'upstream',
34+ 'original_url' => 'https://{default}'
35+ ]
36+ ])),
37+ 'MAGENTO_CLOUD_VARIABLES' => base64_encode(json_encode([
38+ 'ADMIN_EMAIL' => 'admin@example.com',
39+ 'ADMIN_PASSWORD' => '123123q',
40+ 'ADMIN_URL' => 'admin'
41+ ])),
42+ 'MAGENTO_CLOUD_APPLICATION' => base64_encode(json_encode([
43+ 'hooks' => [
44+
45+ ]
46+ ])),
47+ ];
Original file line number Diff line number Diff line change 1+ name : mymagento
2+
3+ type : php:7.3
4+ build :
5+ flavor : composer
6+
7+ runtime :
8+ extensions :
9+ - redis
10+ - xsl
11+ - json
12+ - newrelic
13+ - sodium
14+
15+ relationships :
16+ database : " mysql:mysql"
17+ redis : " redis:redis"
18+ elasticsearch : " elasticsearch:elasticsearch"
19+
20+ mounts :
21+ " var " : " shared:files/var"
22+ " app/etc " : " shared:files/etc"
23+ " pub/media " : " shared:files/media"
24+ " pub/static " : " shared:files/static"
25+
26+ crons :
27+ cronrun :
28+ spec : " * * * * *"
29+ cmd : " php bin/magento cron:run"
Original file line number Diff line number Diff line change 1+ mysql :
2+ type : mysql:10.2
3+ disk : 2048
4+
5+ redis :
6+ type : redis:5.0
7+
8+ elasticsearch :
9+ type : elasticsearch:6.5
10+ disk : 1024
11+ configuration :
12+ plugins :
13+ - plugin_1
14+ - plugin_2
You can’t perform that action at this time.
0 commit comments