<commit_before>h2. Deploying Your Application

This article will walk you through configuring and deploying your Spree application to an environment configured with the Deployment Service. 

endprologue.


INFO: This guide presumes you are running a Spree version of 0.60.x or later, and that your servers have be built using the "Spree Deployment Service":deployment_service.html

h3. Spree Deploymemnt Dependencies

In order to deploy your application to the standard Deployment Service configuration you will need to add the following to your Gemfile:

<ruby>
group :production do
  gem 'unicorn'
  gem 'mysql2'
  gem 'foreman'
  gem 'therubyracer' #only required for 0.70.x or later
end

group :development do
  gem 'capistrano'
end
</ruby>

Once you saved the Gemfile, run bundle install and commit and push your changes to your remote git repository.

NOTE: Please note it's important to ensure you've committed your Gemfile.lock file also.

h3. Configuring Capistrano

Capistrano is the easiest way to deploy your application to your hosting environment, however you can use any system you prefer. 

The Deployment Service will automatically generate a custom recipe for your environment, specific for your Spree version and including your server(s) and git repository details.

To add the basic Capistrano files to your application run the following command:

<shell>capify .</shell><commit_msg>typo in deploying_your_application<commit_after>h2. Deploying Your Application

This article will walk you through configuring and deploying your Spree application to an environment configured with the Deployment Service. 

endprologue.


INFO: This guide presumes you are running a Spree version of 0.60.x or later, and that your servers have be built using the "Spree Deployment Service":deployment_service.html

h3. Spree Deployment Dependencies

In order to deploy your application to the standard Deployment Service configuration you will need to add the following to your Gemfile:

<ruby>
group :production do
  gem 'unicorn'
  gem 'mysql2'
  gem 'foreman'
  gem 'therubyracer' #only required for 0.70.x or later
end

group :development do
  gem 'capistrano'
end
</ruby>

Once you saved the Gemfile, run bundle install and commit and push your changes to your remote git repository.

NOTE: Please note it's important to ensure you've committed your Gemfile.lock file also.

h3. Configuring Capistrano

Capistrano is the easiest way to deploy your application to your hosting environment, however you can use any system you prefer. 

The Deployment Service will automatically generate a custom recipe for your environment, specific for your Spree version and including your server(s) and git repository details.

To add the basic Capistrano files to your application run the following command:

<shell>capify .</shell>
{'fraction_non_alphanumeric': 0.040339702760084924, 'fraction_numerical': 0.007077140835102618, 'mean_word_length': 4.78118609406953, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6030833', 'n_tokens_mistral': 744, 'n_tokens_neox': 712, 'n_words': 399}