Skip to content

Commit

Permalink
Refresh documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Mar 13, 2019
1 parent e85bfd2 commit f4b8853
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 55 deletions.
4 changes: 4 additions & 0 deletions docs/behat/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
The BDD Guide
=============

.. note::

This section is based on the great `Sylius documentation <http://docs.sylius.com>`_.

Behaviour driven development is an approach to software development process that provides software development and management teams
with shared tools and a shared process to collaborate on software development. The awesome part of BDD is its ubiquitous language,
which is used to describe the software in English-like sentences of domain specific language.
Expand Down
4 changes: 4 additions & 0 deletions docs/book/architecture/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Architecture
============

.. note::

This section is based on the great `Sylius documentation <http://docs.sylius.com>`_.

Before we dive separately into every Monofony concept, you need to have an overview of how our main application is structured.
In this chapter we will sketch this architecture and our basic, cornerstone concepts, but also some supportive approaches,
that you need to notice.
Expand Down
49 changes: 0 additions & 49 deletions docs/cookbook/capistrano.rst

This file was deleted.

81 changes: 81 additions & 0 deletions docs/cookbook/deployment/capistrano.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
How to deploy using Capistrano
==============================

.. note::

This page give some hit about Capistrano. To go further check `the official documentation <http://capistranorb.com/>`_

Capistrano is a common tools to deploy a Symfony app. It allows to deploy your app without any interruption.
Your document root in on a symlink which corresponds to a release directory.
This symlink is updated when your build finished successfully.


Install Dependencies
--------------------

We are going to use `Bundler`_ to install capistrano

.. code-block:: bash
$ gem install bundler
Run bundler install command to install gem dependancies in the project Gemfile


.. code-block:: bash
$ bundle install
.. _Bundler: http://bundler.io

Configure your environments
---------------------------

By defaults, there are two environments pre-configured:

* staging
* production

These environments are configured in on ``etc/capistrano/deploy/`` directory.
Replace ``XX.XXX.XX.XXX`` with your server ip addresses

Deploy the staging environment
------------------------------

.. code-block:: bash
$ bundle exec "cap staging deploy"
Deploy the production environment
---------------------------------

.. code-block:: bash
$ bundle exec "cap production deploy"
Create your own task
--------------------

Capistrano allow you to build your own to exec during your deployment.
This exemple create a task that execute a command on deployment target server.

.. code-block:: ruby
namespace :namespace do
desc "task description"
task :task_name do
on roles(:all) do |host|
execute 'command executed on target server'
end
end
end
Tasks hooks
-----------

Capistrano provides hooks in order to exec your task before or after a specific task.
For example if you want to run a task to set a proxy on a remote server before any git check :

.. code-block:: ruby
before 'git:check', 'deploy:add_proxy'
1 change: 1 addition & 0 deletions docs/cookbook/deployment/map.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* :doc:`/cookbook/deployment/capistrano`
6 changes: 3 additions & 3 deletions docs/cookbook/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Fixtures
.. include:: /cookbook/fixtures/map.rst.inc


Capistrano
Deployment
----------

.. toctree::
:hidden:

capistrano
deployment/capistrano

.. include:: /cookbook/map.rst.inc
.. include:: /cookbook/deployment/map.rst.inc
2 changes: 1 addition & 1 deletion docs/cookbook/map.rst.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* :doc:`/cookbook/capistrano`
* :doc:`/cookbook/index`
2 changes: 0 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ The Cookbook

cookbook/index

.. include:: /cookbook/map.rst.inc

The Behat Guide
---------------

Expand Down

0 comments on commit f4b8853

Please sign in to comment.