Skip to content

Commit

Permalink
adjust docker config, add some formatting to paths, change mysql to m…
Browse files Browse the repository at this point in the history
…ariadb change condition to check if system is running on arm in general, not only on mac on arm
  • Loading branch information
ejnshtein committed May 3, 2022
1 parent 6306469 commit e91f724
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions build-packages/magento-scripts/lib/config/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ module.exports = async ({ configuration, ssl, host }, config) => {
const isLinux = os.platform() === 'linux';
const isWsl = await getIsWsl();
const isArm = (await getArch()) === 'arm64';
const isArmMac = (os.platform() === 'darwin') && isArm;

if (!isLinux) {
/**
Expand All @@ -54,7 +53,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
name: `${ prefix }_nginx-data`,
opts: {
type: 'nfs',
device: `${cacheDir}/nginx/conf.d`,
device: `${ path.join(cacheDir, 'nginx', 'conf.d') }`,
o: 'bind'
}
};
Expand All @@ -70,7 +69,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
name: `${ prefix }_setup-data`,
opts: {
type: 'nfs',
device: `${path.join(magentoDir, 'setup')}`,
device: `${ path.join(magentoDir, 'setup') }`,
o: 'bind'
}
};
Expand All @@ -91,7 +90,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
nginx: {
_: 'Nginx',
ports: (!isLinux || isWsl) ? [
`${isIpAddress(host) ? host : '127.0.0.1'}:${ ports.app }:80`
`${ isIpAddress(host) ? host : '127.0.0.1' }:${ ports.app }:80`
] : [],
healthCheck: {
cmd: 'service nginx status'
Expand Down Expand Up @@ -137,7 +136,7 @@ module.exports = async ({ configuration, ssl, host }, config) => {
connectCommand: ['redis-cli']
},
mysql: {
_: !isArmMac ? 'MySQL' : 'MariaDB',
_: !isArm ? 'MySQL' : 'MariaDB',
healthCheck: {
cmd: 'mysqladmin ping --silent'
},
Expand Down Expand Up @@ -165,15 +164,15 @@ module.exports = async ({ configuration, ssl, host }, config) => {
'seccomp=unconfined'
],
network: network.name,
image: !isArmMac ? `mysql:${ mysql.version }` : `mariadb:${ mariadb.version }`,
imageDetails: !isArmMac ? {
image: !isArm ? `mysql:${ mysql.version }` : `mariadb:${ mariadb.version }`,
imageDetails: !isArm ? {
name: 'mysql',
tag: mysql.version
} : {
name: 'mariadb',
tag: mariadb.version
},
name: !isArmMac ? `${ prefix }_mysql` : `${ prefix }_mariadb`
name: !isArm ? `${ prefix }_mysql` : `${ prefix }_mariadb`
},
elasticsearch: {
_: 'ElasticSearch',
Expand Down

0 comments on commit e91f724

Please sign in to comment.