A Magento, Composer, and Capistrano project
Use this project template to start a new Magento CE 1.x site with everything in place for quick and easy development.
- PHP
>= 5.4 - Composer
>= 1.0.0 - n98-magerun
>= 1.97.11 - Ruby
>= 1.9.3with Bundler
In your local development environment:
# Create a new project from this template
$ composer create-project delegator/magerock myproject dev-master --repository-url=https://packages.delegator.com/
# Change this to the name of your project! ^^^^^^^^^
# Go to your new project
$ cd myproject
# Copy the sample environment file and edit where appropriate.
# If you'd like to use the PHP built-in web server, we don't recommend changing the BASE_URL.
$ cp .env.example .env
# Create the database you specified in your .env file:
$ mysql -e "create database myproject_development"
# Install Magento (wait patiently!)
$ ./scripts/install-magento
# Use PHP's built-in web server to run the site locally.
# Visit http://localhost:8080/ in your favorite browser!
$ php -S 127.0.0.1:8080 -t web router.phpPlease see https://github.com/delegator/magerock/wiki for complete documentation!
In Magerock-based projects, your project will look roughly like this:
├── packages/
├── third-party/
└── web/
❗ Wait! Don't copy that extension code just yet! ❗
You might be surprised to find just how many of your favorite Magento modules are installable directly via composer, without you having to copy a single line of PHP code into your project! Take a look: https://packages.firegento.com/
Are you working on custom modules? Taking ownership of a theme? Overriding some
jank third party code? Your code belongs in the packages/ directory. It is
suggested that you use the naming scheme vendor-name/extension-name.
Purchased extensions and other modules not available in the Firegento repository
should be placed in the third-party directory. Use the same naming scheme as
the packages directory above (third-party/extension-name).
This is your web root. Magento core will be installed here. When you run $ composer install, Composer will link each module's files into the configured
locations, much like modman.
# Install dependencies
$ bundle install
# List available capistrano tasks
$ bin/cap -TIn the following steps, <stage> is the Capistrano stage you want to use.
- Set up the Capistrano stage you want to use
- Run
bin/cap <stage> mage:init - Set up your
web/app/etc/local.xmlin theshared/directory on the remote server. - Run
bin/cap <stage> deploy:check - Run
bin/cap <stage> deploy
Please see LICENSE for license information.