diff --git a/README.md b/README.md index 783fe29..0afdaf1 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,23 @@ [![](https://images.microbadger.com/badges/version/diouxx/glpi.svg)](http://microbadger.com/images/diouxx/glpi "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/diouxx/glpi.svg)](http://microbadger.com/images/diouxx/glpi "Get your own image badge on microbadger.com") +# Table of Contents +1. [Introduction](#introduction) +2. [Deploy CLI](#deploy-with-CLI) + - [Deploy GLPI without database](#deploy-glpi-without-database) + - [Deploy GLPI with existing database](#deploy-glpi-with-existing-database) + - [Deploy GLPI with database and persistance container data](#deploy-glpi-with-database-and-persistance-container-data) + - [Deploy a specific release of GLPI](#deploy-a-specific-release-of-glpi) +3. [Deploy docker-compose](#deploy-with-docker-compose) +4. [Environnment variables](#environnment-variables) + - [Timezone](#timezone) + +# Introduction + Install and run an GLPI instance with docker. +# Deploy with CLI + ## Deploy GLPI without database ```sh docker run --name glpi -p 80:80 -d diouxx/glpi @@ -14,7 +29,7 @@ docker run --name glpi -p 80:80 -d diouxx/glpi docker run --name glpi --link yourdatabase:mysql -p 80:80 -d diouxx/glpi ``` -## Deploy GLPI with database and persistance container data (Recommended) +## Deploy GLPI with database and persistance container data For an usage on production environnement or daily usage, it's recommanded to use a data container for persistent data. @@ -40,7 +55,7 @@ Here an example for release 9.1.6 : docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-data -p 80:80 --env "VERSION_GLPI=9.1.6" -d diouxx/glpi ``` -## Deploy with docker-compose +# Deploy with docker-compose To deploy with docker compose, you use *docker-compose.yml* and *mysql.env* file. You can modify **_mysql.env_** to personalize settings like : @@ -55,3 +70,21 @@ To deploy, just run the following command on the same directory as files ```sh docker-compose up -d ``` + +# Environnment variables + +## TIMEZONE +If you need to set timezone for Apache and PHP + +From commande line +```sh +docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-data -p 80:80 --env "TIMEZONE=Europe/Brussels" -d diouxx/glpi +``` + +From docker-compose + +Modify this settings +```yml +environment: + TIMEZONE: Europe/Brussels +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 03d50e4..63deeef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,4 +37,9 @@ services: - mysql:mysql volumes_from: - glpi-data + volumes: + - /etc/timezone:/etc/timezone + - /etc/localtime:/etc/localtime + environment: + TIMEZONE: Europe/Brussels restart: always