Type
library
Staempfli AG Magento2 Builder Tool
library
GPL-3.0
None
None
None
None
None
"require": {
"staempfli/mage2-n98-magerun2": "dev-master"
},
"require-dev": {
"staempfli/mage2-dev-tool": "dev-master"
},
"scripts": {
"setPermissionsBin": "chmod -R +x bin",
"symlinkDevTool": "[ ! -d magento/vendor/staempfli/mage2-dev-tool ] || (ln -sf magento/vendor/staempfli/mage2-dev-tool/build.xml . && ln -sf magento/vendor/staempfli/mage2-dev-tool/build .)",
"post-install-cmd": [
"@setPermissionsBin",
"@symlinkDevTool"
],
"post-update-cmd": [
"@setPermissionsBin",
"@symlinkDevTool"
]
},
"config": {
"secure-http": false,
"bin-dir": "bin",
"vendor-dir": "magento/vendor"
}
/magento #Important: add the slash in order to ignore only the root folder. /config/magento is needed in the repo.
/bin
/build
/build.xml
$ composer update
$ cp -r vendor/staempfli/mage2-dev-tool/config/ config
$ mkdir logs
$ vim logs/.gitignore
# Ignore everything in this directory
*
# Except this file
!.gitignore
Set the specific core_config_data for the different environments
$ mv config/magento/config.yaml.dist config/magento/config.yaml
vim config/magento/config.yaml
Leave the existing placeholders ({{}}) as the will automatically replace during installation
mv config/magento/env.php.template.dist config/magento/env.php.template
mv config/magento/install-config-mysql.php.template config/magento/install-config-mysql.php.template
mv config/vhosts/apache.local.conf.dist config/vhosts/apache.local.conf
mv config/vhosts/nginx.local.conf.dist config/vhosts/nginx.local.conf
mv config/servers/config.yaml.dist config/servers/config.yaml
vim config/servers/config.yaml
mv config/project.properties.dist config/project.properties
vim config/project.properties
$ bin/phing install
If you are tired of writing over and over again some of the questions during the process, you can setup your default environment parameters as follows:
Create the folder _conf
one level higher that your project root. That would be into the folder where you usually have all the projects
Add a file called environment.properties
inside that folder:
$ vim _conf/environment.properties
project.environment=<your_environment_type> (usually Local)
database.admin.username=<your_database_admin_user>
environment.server.type=<your_server_type> (apache or nginx)
environment.vhosts.dir=<your_preferred_vhost.d_path>
You can use the development tools as follows:
$ bin/phing -l
$ bin/phing install
$ bin/phing sync
$ <path_to_project_root>/bin/phing -f <path_to_project_root>/build.xml <target>
Example: $ ../../../../bin/phing -f ../../../../build.xml -l