Switch to ARM architecture (M1 chip)
Edit on GitHubThis document describes how to switch Docker based projects to ARM architecture. This lets you run Spryker projects on M1 based Apple devices.
To switch to ARM architecture, follow the steps:
Update Sass
Replace x86 based Sass with an ARM based one:
- In
package.json
, removenode-sass
dependencies. - Add
sass
andsass-loader
dependencies.
...
"sass": "~1.32.13",
"sass-loader": "~10.2.0",
...
- Update
@spryker/oryx-for-zed
:
...
"@spryker/oryx-for-zed": "~2.11.5",
...
- In
frontend/configs/development.js
, add configuration forsaas-loader
:
loader: 'sass-loader',
options: {
implementation: require('sass'),
}
- Enter the Docker SDK CLI:
docker/sdk cli
- Update
package-lock.json
and install dependencies based on your package manager:- npm:
npm install
- yarn:
yarn install
- Rebuild Yves:
npm run yves
- Rebuild Zed
npm run zed
Update RabbitMQ and Jenkins services
In the deploy file, update RabbitMQ and Jenkins to ARM supporting versions. Example:
services:
...
broker:
engine: rabbitmq
version: '3.9'
api:
username: 'spryker'
password: 'secret'
endpoints:
queue.spryker.local:
localhost:5672:
protocol: tcp
...
scheduler:
engine: jenkins
version: '2.324'
endpoints:
scheduler.spryker.local:
...
Enable Jenkins CSRF protection
- In the deploy file, enable the usage of the CSRF variable:
...
services:
scheduler:
csrf-protection-enabled: true
...
- In the config file, enable Jenkins CSRF protection by defining the CSRF variable:
...
$config[SchedulerJenkinsConstants::JENKINS_CONFIGURATION] = [
SchedulerConfig::SCHEDULER_JENKINS => [
SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => (bool)getenv('SPRYKER_JENKINS_CSRF_PROTECTION_ENABLED'),
],
];
...
Now your project supports ARM architecture and you can run it on M1 based Apple devices.
Thank you!
For submitting the form