mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge pull request #4 from jphuart/master
Review of Developper install + Installing your Posgressql server and chill database
This commit is contained in:
commit
f6a801cd47
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
_exts
|
||||
build/*
|
||||
!build/git.txt
|
||||
*~
|
||||
.project
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 52f7bd2216cc22ef52494f346c5643bb2a74513f
|
@ -11,30 +11,35 @@
|
||||
Installation for development
|
||||
****************************
|
||||
|
||||
Installation for development should let you able to have an access to the source code, upload the code to our CVS (i.e. `git`_), and working with `composer`_.
|
||||
Installation for development should allow:
|
||||
|
||||
- access to the source code,
|
||||
- upload the code to our CVS (i.e. `git`_) and
|
||||
- work with `composer`_.
|
||||
|
||||
As Chill is divided into bundles (the Symfony name for 'modules'), each bundle has his own repository.
|
||||
|
||||
Installation and big picture
|
||||
----------------------------
|
||||
|
||||
At first, you should install Chill as described in the :ref:`basic-installation` section.
|
||||
First, you should install Chill as described in the :ref:`basic-installation` section.
|
||||
|
||||
Two things must be modified :
|
||||
|
||||
At first, You should add the `--prefer-source` argument when you create project.
|
||||
First, add the `--prefer-source` argument when you create project.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer create-project chill-project/standard path/to/your/directory --stability=dev --prefer-source
|
||||
|
||||
Secondly, if composer ask you the following question : ::
|
||||
Second, when composer ask you the following question : ::
|
||||
|
||||
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?
|
||||
|
||||
**You should answer `n` (no).**
|
||||
|
||||
This will install a project. All downloaded bundles will be stored in the `/vendor` directories. In those directories, you will have access to the git commands.
|
||||
Once Chill is installed, all the downloaded bundles will be stored in the `/vendor` directories.
|
||||
In those directories, you will have access to the git commands.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -80,9 +85,10 @@ Working with your own fork
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Ideally, you will work on a fork of the main github repository.
|
||||
To ensure that composer will download the code from **your** repository, you will have to adapt the `composer.json` file accordingly, using your own repository.
|
||||
To ensure that composer will download the code from **your** repository, you will have to adapt the `composer.json` file accordingly, using your own repositories.
|
||||
|
||||
Add the following lines to your composer.json file if you want to force composer to download from your own repository:
|
||||
For each Chill module that you have forked, add an indexed array into the "repositories" key of the composer.json file
|
||||
at the root of the chill installation directory if you want to force composer to download from your own forked repositories:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
@ -90,9 +96,21 @@ Add the following lines to your composer.json file if you want to force composer
|
||||
{
|
||||
"type": "git",
|
||||
"url": "git://github.com/your-github-username/ChillMain.git"
|
||||
},
|
||||
{
|
||||
"type": "git",
|
||||
"url": "git://github.com/your-github-username/Chill-Person.git"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Then run composer update to load your forked code.
|
||||
If it does not happen, delete the content of the chill/vendor/chill-project/my_forked_bundle and relaunch composer update and the code will be downloaded from your fork.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer update
|
||||
|
||||
You may also `use aliases <https://getcomposer.org/doc/articles/aliases.md>`_ to define versions.
|
||||
|
||||
.. _editing-code-and-commiting :
|
||||
|
@ -1,110 +0,0 @@
|
||||
.. Copyright (C) 2014 Champs Libres Cooperative SCRLFS
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
.. _installation-for-development :
|
||||
|
||||
Installation for development
|
||||
****************************
|
||||
|
||||
Installation for development should let you able to have an access to the source code, upload the code to our CVS (i.e. `git`_), and working with `composer`_.
|
||||
|
||||
As Chill is divided into modules, each module has his own repository.
|
||||
|
||||
Installation and big picture
|
||||
-----------------------------
|
||||
|
||||
At first, you should install Chill as described in the :ref:`basic-installation` section.
|
||||
|
||||
Two things must be modified :
|
||||
|
||||
At first, You should add the `--prefer-source` argument when you create project.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
php composer.phar create-project champs-libres/chill-standard \
|
||||
path/to/your/directory --stability=dev --prefer-source
|
||||
|
||||
Secondly, if composer ask you the following question : ::
|
||||
|
||||
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?
|
||||
|
||||
**You should answer `n` (no).**
|
||||
|
||||
This will install a project. All downloaded modules will be stored in the `/vendor` directories. In those directories, you will have access to the git commands.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd vendor/champs-libres/chill-main/
|
||||
$ git remote -v
|
||||
composer git://github.com/Champs-Libres/ChillMain.git (fetch)
|
||||
composer git://github.com/Champs-Libres/ChillMain.git (push)
|
||||
origin git://github.com/Champs-Libres/ChillMain.git (fetch)
|
||||
origin git@github.com:Champs-Libres/ChillMain.git (push)
|
||||
|
||||
Working with your own fork
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. warning
|
||||
|
||||
This section has not been tested yet. Feedback wanted.
|
||||
|
||||
Ideally, you will work on a fork of the main github repository. To ensure that composer will download the code from **your** repository, you will have to adapt the `composer.json` file accordingly, using your own repository.
|
||||
|
||||
Add the following lines to your composer.json file if you want to force composer to download from your own repository. This will force to use your own repository for the ChillMain bundle, insert in `composer.json` the following lines :
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
"repositories": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "git://github.com/your-github-username/ChillMain.git"
|
||||
}
|
||||
]
|
||||
|
||||
You may also `use aliases <https://getcomposer.org/doc/articles/aliases.md>`_ to define versions.
|
||||
|
||||
.. _editing-code-and-commiting :
|
||||
|
||||
Editing the code and commiting
|
||||
------------------------------
|
||||
|
||||
You may edit code in the `vendor/path/to/the/bundle` directory.
|
||||
|
||||
After your edits, you should commit as usually :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd vendor/path/to/bundle
|
||||
$ git status
|
||||
Sur la branche master
|
||||
Votre branche est à jour avec 'origin/master'.
|
||||
|
||||
rien à valider, la copie de travail est propre
|
||||
|
||||
.. warning
|
||||
|
||||
The git command must be run from you vendor bundle's path (`vendor/path/to/bundle`).
|
||||
|
||||
Tips
|
||||
^^^^
|
||||
|
||||
The command `composer status` (`see composer documentation <https://getcomposer.org/doc/03-cli.md#status>`_) will give you and idea of which bundle has been edited :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd ./../../ #back to the root project directory
|
||||
$ composer status
|
||||
You have changes in the following dependencies:
|
||||
/path/to/your/project/install/vendor/champs-libres/chill-main
|
||||
Use --verbose (-v) to see modified files
|
||||
|
||||
|
||||
|
||||
|
||||
.. _git: http://git-scm.org
|
||||
.. _composer: https://getcomposer.org
|
@ -11,16 +11,64 @@
|
||||
Install PostgresSql server
|
||||
##########################
|
||||
|
||||
.. todo::
|
||||
On a linux environment, installing Postgresql server is very easy.
|
||||
Here follows the instructions for a debian based distribution (as Ubuntu) using the distribution repositories.
|
||||
To have the latest version follow the instructions of the `Postgresql wiki`_.
|
||||
|
||||
the section "Install PostresSql database" must be written. Help appreciated :-)
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install postgresql
|
||||
|
||||
|
||||
Having a look at the install messages, you will guess quickly which is the version installed.
|
||||
Anyway you can check this with the following code:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
psql --version
|
||||
>>> psql (PostgreSQL) 9.4.5
|
||||
|
||||
To be able to add the unaccent extension to your database,
|
||||
you will have to install the following package where x.x are the first 2 parts of the version,
|
||||
9.4 in this example.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get install postgresql-contrib-x.x
|
||||
|
||||
You are ready to play with Postgressql.
|
||||
|
||||
.. note::
|
||||
|
||||
To avoid installation and configuration of a postgresql server, you may use `our docker image <https://registry.hub.docker.com/u/chill/database/>`_ to start and configure a database as decribed in the basic installation chapter.
|
||||
This solution can be used also in a production environment.
|
||||
|
||||
|
||||
.. note::
|
||||
Install PostresSql database
|
||||
###########################
|
||||
|
||||
Installing unaccent extension on ther server is possible with the package `postgresql-contrib-9.x` (replace 9.x with your server version). The extension may be enabled with running `CREATE EXTENSION unaccent;` in the database, with a superuser account.
|
||||
Here follows as an example the instructions that has been used on Ubuntu 14.04 distribution to install the Chill database.
|
||||
Feel free to customize it following your preferences, but do not forget to enable the `unaccent` extension on your database.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo su
|
||||
su postgres
|
||||
# At the prompt of the following instruction, I have typed 'my_terrible_secret' as password
|
||||
createuser --pwprompt chill_user
|
||||
createdb -O chill_user chill_db
|
||||
psql -d chill_db -c "CREATE EXTENSION unaccent;"
|
||||
|
||||
When you will use composer to install Chill, you will have to provide some database information.
|
||||
If you follow this tutorial these will be:
|
||||
|
||||
- database_host: localhost
|
||||
- database_port: 5432
|
||||
- database_name: chill_db
|
||||
- database_user: chill_user
|
||||
- database_password: my_terrible_secret
|
||||
- locale: en
|
||||
|
||||
|
||||
.. _Postgresql wiki: https://wiki.postgresql.org/wiki/Apt
|
Loading…
x
Reference in New Issue
Block a user