Install chill without docker

Basic installation

Chill is written in PHP and use the symfony framework. We take advantages of all the framework’s feature, and installation should be as simple as installing symfony.

We are going to describe a basic installation on Unix systems (Unix, Mac OS). Windows installation has not been tested.

Requirements

Client requirements

Chill is accessible through a web browser. Currently, we focus our support on Firefox, because firefox is open source, cross-platform, and very well active. The software should work with other browser (Chromium, Opera, ...) but some functionalities might break.

Server requirements

  • a postgresql database, with the *unaccent* extension enabled. The minimum version is postgresql 9.4. You can use the docker image provided. Using the docker image is also a solution for production site. Alternatively you can install a PosgresSql server see Install PostgresSql server.
  • PHP version >= 5.5. Check that extensions php5-intl and php5-pgsql are installed and that ‘date.timezone‘ is correctly defined in your php.ini.
  • Composer.
  • If you run Chill in production mode, you should also install a web server (apache, ngnix, ...) see Install production webserver. For this basic installation meant for testing and/or development, we will make it simplier using the php built-in server.

Let’s start by installing composer as it is needed to create and update our Chill project.

Install composer

Note

If you do not know composer, it is a good idea to have a glance at the composer documentation

Install composer on your system, according to the instructions here : https://getcomposer.org/download

Install a database

Let’s continue now by installing and configuring the docker database.

Note

If you do not want install a database with docker, you should create a postgresql database manually on your system, and add the extension UNACCENT: CREATE EXTENSION "unaccent".

You will find all details concerning the installation of docker on their official site looking for your OS into the menu Install/Docker Engine.

Once docker is installed, run :

sudo docker run -P --name=chill_db chill/database

This will download the chill/database image and start a new docker instance with the name chill_db and export the postgresql port 5432 on another random local port.

The db will start in your terminal. In another terminal, you can check if the docker database is running and showing the exposed port with the following command:

sudo docker ps

>>>> CONTAINER ID   IMAGE           COMMAND                CREATED       STATUS      PORTS                     NAMES
>>>> 08bbb62bd5e8   chill/database  "/docker-entrypoint.   6 days ago    Up 5 hours  0.0.0.0:32768->5432/tcp   chill_db

You can start the container it via:

sudo docker start chill_db
>>>> chill_db

Note

The commande to stop the docker container is:

sudo docker stop chill_db
>>>> chill_db

Installation

Chill is installed with composer.

Preparation

Before creating your project, make sure that you know the following information :

  • how to access to your database: host, port, database name, and your credentials (username and password) ;
  • a random string, which will be used to improve entropy in security. Choose anything you want (random character, your father’s birthplace, ...).

Note

If you have installed the docker database:

Open a terminal and run

sudo docker port chill_db 5432

This command will show on which port the docker container is listening, on your localhost. This is the value to be used to fill the field ‘database_port’ hereafter.

Your information should be:

  • database_host: 127.0.0.1
  • database_port: result of the command hereabove.
  • database_name: postgres
  • database_user: postgres
  • database_password: postgres
  • locale: fr

Create your project

Create your Chill project using composer:

composer create-project chill-project/standard path/to/your/directory ~1.0

Composer will download the standard architecture and ask you a few question about how to configure your project.

  • database_host : your postgresql server’s address
  • database_port : the port to reach your postgresql server
  • database_name : the name of your database
  • database_user : the username to reach your database
  • database_password : your username’s password
  • locale: the language, as iso code. Until now, only fr is supported
  • secret: the secret string you prepared (see Preparation)

You may accept the default parameters of debug_toolbar, debug_redirects and use_assetic_controller for a demonstration installation. For production, set them all to false.

Note

If composer ask you the following question :

Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?

You may answer Y (Yes), or simply press the return button.

Note

At the end of the installation, composer will warn you to execute database migration script, with this message :

Some migration files have been imported. You should run
`php app/console doctrine:migrations:status` and/or
`php app/console doctrine:migrations:migrate` to apply them to your DB.

We will proceed this step a bit later. See Create your database schema.

Check your requirements

Move your cursor to the new directory

cd path/to/your/directory

You should check your installation by running

php app/check.php

Which will give you information about how your installation fullfill the requirements to running Chill, and give you advices to optimize your installation.

Create your database schema

This step will create your table and minimum information into your database. Simply run

php app/console doctrine:migrations:migrate

SQL queries will be printed into your console.

Populate your database with basic information

Once your database schema is ready, if you want to test the application you have the opportunity to populate your database with some basic data. Those are provided through a script and might depends from the bundle you choose to install (see Install additional bundles). This script has not to be launched for a production server and will erase any existing data. It is meant only for testing the application.

php app/console doctrine:fixtures:load

Preparing assets

You have to dump assets into the web directory. Even if the command should be run by Composer, you may run it manually :

php app/console assetic:dump
php app/console assets:install

Launch your server

If everything was fine, you are able to launch your built-in server :

php app/console server:run

Your server should now be available at http://localhost:8000. Type this address on your browser and you should see the homepage. The default login is ‘center a_social’ with password ‘password’.

Have fun exploring Chill.