File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class BuildCompose extends Command
69
69
self ::OPTION_RABBIT_MQ => ServiceInterface::NAME_RABBITMQ ,
70
70
self ::OPTION_EXPOSE_DB_PORT => ProductionBuilder::KEY_EXPOSE_DB_PORT ,
71
71
self ::OPTION_SELENIUM_VERSION => ServiceFactory::SERVICE_SELENIUM_VERSION ,
72
- self ::OPTION_SELENIUM_IMAGE => ServiceFactory::SERVICE_SELENIUM_IMAGE
72
+ self ::OPTION_SELENIUM_IMAGE => ServiceFactory::SERVICE_SELENIUM_IMAGE ,
73
73
];
74
74
75
75
/**
@@ -220,6 +220,12 @@ protected function configure(): void
220
220
))
221
221
)
222
222
)
223
+ ->addOption (
224
+ self ::OPTION_WITH_CRON ,
225
+ null ,
226
+ InputOption::VALUE_NONE ,
227
+ 'Add cron container '
228
+ )
223
229
->addOption (
224
230
self ::OPTION_NO_VARNISH ,
225
231
null ,
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ interface BuilderInterface
19
19
public const DEFAULT_VARNISH_VERSION = 'latest ' ;
20
20
public const DEFAULT_TLS_VERSION = 'latest ' ;
21
21
22
- public const KEY_NO_CRON = 'no-cron ' ;
23
22
public const KEY_NO_VARNISH = 'no-varnish ' ;
24
23
public const KEY_EXPOSE_DB_PORT = 'expose-db-port ' ;
25
24
public const KEY_NO_TMP_MOUNTS = 'no-tmp-mounts ' ;
26
25
public const KEY_WITH_SELENIUM = 'with-selenium ' ;
27
26
public const KEY_SYNC_ENGINE = 'sync-engine ' ;
27
+ public const KEY_WITH_CRON = 'with-cron ' ;
28
28
29
29
public const SERVICE_GENERIC = 'generic ' ;
30
30
public const SERVICE_DB = 'db ' ;
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ class ProductionBuilder implements BuilderInterface
37
37
public const SYNC_ENGINE_MOUNT = 'mount ' ;
38
38
public const DEFAULT_SYNC_ENGINE = self ::SYNC_ENGINE_MOUNT ;
39
39
40
- public const KEY_WITH_CRON = 'with-cron ' ;
41
- public const KEY_EXPOSE_DB_PORT = 'expose-db-port ' ;
42
- public const KEY_NO_TMP_MOUNTS = 'no-tmp-mounts ' ;
43
- public const KEY_WITH_SELENIUM = 'with-selenium ' ;
44
40
/**
45
41
* @var array
46
42
*/
@@ -390,12 +386,15 @@ public function build(Repository $config): Manager
390
386
self ::$ cliDepends
391
387
);
392
388
393
- if ($ this ->config ->get (self ::KEY_WITH_CRON , false )) {
394
- $ services ['cron ' ] = $ this ->getCronCliService (
395
- $ phpVersion ,
396
- true ,
397
- $ cliDepends ,
398
- 'cron.magento2.docker '
389
+ if ($ config ->get (self ::KEY_WITH_CRON , false )) {
390
+ $ manager ->addService (
391
+ self ::SERVICE_CRON ,
392
+ array_merge (
393
+ $ this ->getCronCliService ($ phpVersion ),
394
+ ['volumes ' => $ volumesRo ]
395
+ ),
396
+ [self ::NETWORK_MAGENTO ],
397
+ self ::$ cliDepends
399
398
);
400
399
}
401
400
You can’t perform that action at this time.
0 commit comments