Skip to content

Commit

Permalink
support for production mode modified .exp files
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvind committed Mar 13, 2020
1 parent 73b2508 commit 1a9695e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
10 changes: 6 additions & 4 deletions src/Compose/ProductionBuilder.php
Expand Up @@ -144,6 +144,8 @@ public function build(Config $config): Manager
$manager->addNetwork(self::NETWORK_MAGENTO, ['driver' => 'bridge']);
$manager->addNetwork(self::NETWORK_MAGENTO_BUILD, ['driver' => 'bridge']);

$volumePrefix = $config->getName() . '-';

$volumes = [
self::VOLUME_MAGENTO => [
'driver_opts' => [
Expand All @@ -152,8 +154,8 @@ public function build(Config $config): Manager
'o' => 'bind'
]
],
self::VOLUME_MAGENTO_DB => [],
self::VOLUME_MARIADB_CONF => [
$volumePrefix . self::VOLUME_MAGENTO_DB => [],
$volumePrefix . self::VOLUME_MARIADB_CONF => [
'driver_opts' => [
'type' => 'none',
'device' => $this->resolver->getRootPath('/.docker/mysql/mariadb.conf.d'),
Expand Down Expand Up @@ -240,9 +242,9 @@ public function build(Config $config): Manager
'ports' => [$dbPorts],
'volumes' => array_merge(
[
self::VOLUME_MAGENTO_DB . ':/var/lib/mysql',
$volumePrefix . self::VOLUME_MAGENTO_DB . ':/var/lib/mysql',
self::VOLUME_DOCKER_ETRYPOINT . ':/docker-entrypoint-initdb.d',
self::VOLUME_MARIADB_CONF . ':/etc/mysql/mariadb.conf.d',
$volumePrefix . self::VOLUME_MARIADB_CONF . ':/etc/mysql/mariadb.conf.d',
],
$volumesMount
)
Expand Down
8 changes: 4 additions & 4 deletions src/Test/Integration/_files/cloud_base/docker-compose.exp.yml
Expand Up @@ -11,9 +11,9 @@ services:
ports:
- '3306'
volumes:
- 'magento-db:/var/lib/mysql'
- 'mymagento-magento-db:/var/lib/mysql'
- 'docker-entrypoint:/docker-entrypoint-initdb.d'
- 'mariadb-conf:/etc/mysql/mariadb.conf.d'
- 'mymagento-mariadb-conf:/etc/mysql/mariadb.conf.d'
- 'docker-mnt:/mnt:delegated'
networks:
magento:
Expand Down Expand Up @@ -164,8 +164,8 @@ volumes:
type: none
device: '${PWD}/'
o: bind
magento-db: { }
mariadb-conf:
mymagento-magento-db: { }
mymagento-mariadb-conf:
driver_opts:
type: none
device: '${PWD}/.docker/mysql/mariadb.conf.d'
Expand Down
Expand Up @@ -11,9 +11,9 @@ services:
ports:
- '3306'
volumes:
- 'magento-db:/var/lib/mysql'
- 'mymagento-magento-db:/var/lib/mysql'
- 'docker-entrypoint:/docker-entrypoint-initdb.d'
- 'mariadb-conf:/etc/mysql/mariadb.conf.d'
- 'mymagento-mariadb-conf:/etc/mysql/mariadb.conf.d'
- 'docker-mnt:/mnt:delegated'
networks:
magento:
Expand Down Expand Up @@ -259,8 +259,8 @@ volumes:
type: none
device: '${PWD}/'
o: bind
magento-db: { }
mariadb-conf:
mymagento-magento-db: { }
mymagento-mariadb-conf:
driver_opts:
type: none
device: '${PWD}/.docker/mysql/mariadb.conf.d'
Expand Down

0 comments on commit 1a9695e

Please sign in to comment.