Skip to content
Snippets Groups Projects

Bokeh Docker composition

This tool provide an easy way to have a local basic Bokeh installation.

It depends on docker and docker-compose, see https://docs.docker.com/.

As a PHP web application, Bokeh depends on PHP itself (php-fpm), a web server (nginx) and a database (mariadb).

TL;DR

Launch run.sh to start composition with some variables configured in .env file.

Bokeh will be loaded with minimal basic datas, available by default at http://localhost.

Administrator account is admin/achanger by default.

Launch stop.sh to stop all services, beware this will drop current database.

Want to know more ? See details in compose.yml or read below.

Services

PHP

Customized php-fpm docker image with required extensions, debug, profile and unit testing capabilities.

Configuration files can be found in php-fpm/php.ini and php-fpm/php-fpm.conf.

To debug you will have to add xdebug configuration https://xdebug.org/docs in local.php file in Bokeh directory.

ini_set('xdebug.client_port', XXXX); // port where your debugger/IDE listen
ini_set('xdebug.client_host', 'XX.XX.XX.XX'); // your IP
ini_set('xdebug.halt_level', E_ERROR);

You can run unit tests from within the php service.

docker-compose -f compose.yml exec php bash
su webmaster
phpunit ....

or

docker-compose -f compose.yml exec php su webmaster -c "phpunit ..."

MariaDB

Standard MariaDB image with specific configuration in conf/mariadb/bokeh.cnf

Main points are:

  • default character set UTF-8: it has some consequences on available index size of char/varchar columns
  • ft_min_word_len and ft_stopword_file: Bokeh index words at the first character and has no stopwords file in database layer but some stop words in its code (see library/Class/Indexation.php)

Nginx

Standard nginx image with specific configuration in conf/nginx/bokeh.conf