chill-bundles/source/installation/install_with_docker.rst

81 lines
3.4 KiB
ReStructuredText

.. 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".
Install with docker
####################
The installation with docker is the canonical way to install Chill in production.
Availables images and flavors
=============================
We provide docker images which here : https://hub.docker.com/r/chill/standard/
There are differents "flavors" of docker, depending on which bundles are installed. Those flavors are available as tags, which are named according to bundles'names, with a prefix for the stable or dev versions. Those flavors are listed here : https://hub.docker.com/r/chill/standard/tags/.
How to install
==============
Prerequisites
-------------
Make sure you have installed ``docker`` and ``docker-compose`` installed.
Create your ``docker-compose`` project
--------------------------------------
1. Create an empty working directory (``mkdir chill && cd chill``)
2. Download or copy-paste the above :download:`docker-compose.yml file </_static/code/installation/docker-compose.yml>`
.. literalinclude:: /_static/code/installation/docker-compose.yml
:language: yaml
3. Adapt eventually the image with your own requested flavor.
4. Download or copy-paster the above :download:`nginx.conf file </_static/code/installation/nginx.conf>`. This file must be located in the same directory of your ``docker-compose.yml`` file.
.. literalinclude:: /_static/code/installation/nginx.conf
:language: nginx
5. Launch the stack with ``docker-compose up``. Docker and docker-compose will download the container images, create an internal network and create the database schema.
6. Browse http://localhost:8080, you are ready to start !
To stop the container, you can type ``CTRL+C`` in the terminal to stop container **OR** run ``docker-compose stop`` in a separate terminal.
On startup, you will only have access to the admin user: login ``admin``, password ``admin`` (as defined in ``docker-compose.yml`` file, under an environment variabled called ``ADMIN_PASSWORD``.
Create fixtures (more user and fake data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can create fixtures using the command ``docker-compose exec fpm php -d memory_limit=-1 doctrine:fixtures:load``.
This will create those users, which password is always ``password``:
* center a_social
* center a_administrative
* center a_direction
* center b_social
* center b_administrative
* center b_direction
* multi_center
Create your own images
======================
You can create your own images, compile yourself and adapt the flavors to your needs. The source of the docker images are available here : https://framagit.org/Chill-project/docker-standard
.. _the composer documentation: https://getcomposer.org/doc/
.. _the composer introduction: https://getcomposer.org/doc/00-intro.md
.. _the standard architecture: https://github.com/Champs-Libres/chill-standard
.. _composer: https://getcomposer.org
.. _Firefox: https://www.mozilla.org
.. _symfony framework: http://symfony.com
.. _*unaccent* extension: http://www.postgresql.org/docs/current/static/unaccent.html