34 Commits
Author SHA1 Message Date
DiouxX 58ff53e00b Add SNMP package 2018-12-28 10:19:45 +01:00
DiouxX c160bc51b7 Remove useless Busybox container 2018-11-15 20:06:22 +01:00
DiouxX c1560a4137 Specified Mysql version to avoid error connection with Mysql vesion 8 2018-10-08 08:47:02 +02:00
DiouxX 6498b150b8 Add CAS plugin 2018-08-24 16:26:18 +02:00
DiouxX e7ba97f4be Merge pull request #16 from pcortellezzi/master
Use GitHub API to retrieve the release download url
2018-08-24 15:22:56 +02:00
pcortellezzi cc055d9e3c Revert change on wrong test gplpi directory empty 2018-08-24 14:58:06 +02:00
Philippe CORTELLEZZI 0dbd0e33e9 Use GitHub API to retrieve the release download url 2018-07-19 09:00:53 +02:00
DiouxX 339ff3a2b4 Add Read Only to volume timezone and localtime 2018-04-23 11:48:58 +02:00
DiouxX 16b5b98ce9 Update README 2018-04-11 16:29:51 +02:00
DiouxX e1b0aeed3b delete docker-compose-test.yml file 2018-04-11 16:04:17 +02:00
DiouxX 29a1582714 add environnement varibales on docker-compose 2018-04-11 15:54:26 +02:00
DiouxX fb5dc6cf9b add .gitignore file 2018-04-11 15:51:17 +02:00
DiouxX 3acba52bf2 Add timezone settings 2018-04-11 15:38:51 +02:00
DiouxX 8b13a3bf5c Merge pull request #9 from Lunaden/master
Fix Cron
2018-04-11 14:40:43 +02:00
DiouxX d8ff9bd5e0 Merge branch 'master' into master 2018-04-11 14:40:22 +02:00
root c5a337fe56 Remove leftover timezone.ini file 2018-04-11 14:20:29 +02:00
root d88216d498 Fix timezone where somtimes apache / php timezone differ from container timezone 2018-04-11 14:09:54 +02:00
DiouxX e8a579131f Cron feature Fix 2018-04-11 11:36:51 +02:00
Drouin Amaury c59a35788d Try to fix timezone in apache2 / php 2018-04-11 11:28:49 +02:00
Drouin Amaury 3b2f81ab30 Add cron to Dockerfile install. Change glpi-start.sh to add cron file to
the right directory and start cron at start before apache2ctl
2018-04-11 11:15:45 +02:00
DiouxX 870a041ae7 Add scheduled task features by cron 2017-12-17 16:10:45 +01:00
DiouxX 5d78f773c3 Merge pull request #5 from sylvainrolland/master
add  latest release for GLPI_VERSION
2017-09-05 09:08:11 +02:00
sylvainrolland d41c05b608 Update README.md 2017-08-18 11:46:11 +02:00
sylvainrolland 652e9ef9ee update readme for release choice
add specific release choice
2017-08-18 11:35:51 +02:00
sylvainrolland b7174c8e45 change VERSION_GLPI for latest release
change VERSION_GLPI for get latest release if undifined when container initialization.
2017-08-18 11:31:48 +02:00
DiouxX 8c7fe25f3d Change php version with debian stretch and add php extensions 2017-07-11 12:18:02 +02:00
DiouxX 3b77fe8f27 Add version 9.1.4 2017-07-11 11:51:41 +02:00
DiouxX 466c6800d0 Add version 9.1.3 2017-05-15 11:40:46 +02:00
DiouxX 5cbdd069d3 Spelling error#3 persitance -> persistance 2017-05-05 07:48:33 +02:00
DiouxX dd37b587ff Bug Fix#2 LDAPS authentification 2017-04-28 12:08:11 +02:00
DiouxX cbe50a7c82 Merge branch '9.1.2'
Modify glpi download link for 9.1.2 because archive format change from tar.gz to tgz
2017-04-26 17:04:43 +02:00
DiouxX d201069462 Update Glpi link download tar.gz -> tgz 2017-04-26 17:03:44 +02:00
DiouxX df9c2fe638 Automatic restart glpi container 2017-04-26 16:14:29 +02:00
DiouxX 20b9c7c80a Add version 9.1.2 2017-03-29 14:07:06 +02:00
5 changed files with 109 additions and 34 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
docker-compose-test.yml
+16 -8
View File
@@ -8,17 +8,25 @@ ENV DEBIAN_FRONTEND noninteractive
#Installation d'apache et de php5 avec extension #Installation d'apache et de php5 avec extension
RUN apt update \ RUN apt update \
&& apt -y upgrade \
&& apt -y install \ && apt -y install \
apache2 \ apache2 \
php5 \ php \
php5-mysql \ php-mysql \
php5-ldap \ php-ldap \
php5-xmlrpc \ php-xmlrpc \
php5-imap \ php-imap \
curl \ curl \
php5-curl \ php-curl \
php5-gd \ php-gd \
wget php-mbstring \
php-xml \
php-apcu-bc \
php-cas \
cron \
wget \
jq \
snmpd
#Copie et execution du script pour l'installation et l'initialisation de GLPI #Copie et execution du script pour l'installation et l'initialisation de GLPI
COPY glpi-start.sh /opt/ COPY glpi-start.sh /opt/
+44 -3
View File
@@ -2,7 +2,22 @@
[![](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") [![](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")
Install and run an GLPI instance with docker # 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 ## Deploy GLPI without database
```sh ```sh
@@ -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 docker run --name glpi --link yourdatabase:mysql -p 80:80 -d diouxx/glpi
``` ```
## Deploy GLPI with database and persitance 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. For an usage on production environnement or daily usage, it's recommanded to use a data container for persistent data.
@@ -32,7 +47,15 @@ docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-da
Enjoy :) Enjoy :)
## Deploy with docker-compose ## Deploy a specific release of GLPI
Default, docker run will use the latest release of GLPI.
For an usage on production environnement, it's recommanded to use the latest release.
Here an example for release 9.1.6 :
```sh
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
To deploy with docker compose, you use *docker-compose.yml* and *mysql.env* file. To deploy with docker compose, you use *docker-compose.yml* and *mysql.env* file.
You can modify **_mysql.env_** to personalize settings like : You can modify **_mysql.env_** to personalize settings like :
@@ -47,3 +70,21 @@ To deploy, just run the following command on the same directory as files
```sh ```sh
docker-compose up -d 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
```
+14 -20
View File
@@ -1,29 +1,18 @@
#Mysql Persitance Data version: "3"
mysql-data:
image: busybox
container_name: mysql-data
volumes:
- /var/lib/mysql:/var/lib/mysql
services:
#Mysql Container #Mysql Container
mysql: mysql:
image: mysql image: mysql:5.7.23
container_name: mysql container_name: mysql
hostname: mysql hostname: mysql
volumes_from: volumes:
- mysql-data - /var/lib/mysql:/var/lib/mysql
env_file: env_file:
- ./mysql.env - ./mysql.env
#GLPI Pesitance Data
glpi-data:
image: busybox
container_name: glpi-data
volumes:
- /var/www/html/glpi:/var/www/html/glpi
#GLPI Container #GLPI Container
glpi: glpi:
image: diouxx/glpi image: diouxx/glpi
container_name : glpi container_name : glpi
hostname: glpi hostname: glpi
@@ -31,5 +20,10 @@ glpi:
- "80:80" - "80:80"
links: links:
- mysql:mysql - mysql:mysql
volumes_from: volumes:
- glpi-data - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/www/html/glpi/:/var/www/html/glpi
environment:
- TIMEZONE=Europe/Brussels
restart: always
+34 -3
View File
@@ -1,11 +1,25 @@
#!/bin/bash #!/bin/bash
VERSION_GLPI=9.1 #Controle du choix de version ou prise de la latest
SRC_GLPI=https://github.com/glpi-project/glpi/releases/download/${VERSION_GLPI}/glpi-${VERSION_GLPI}.tar.gz [[ ! "$VERSION_GLPI" ]] \
TAR_GLPI=glpi-${VERSION_GLPI}.tar.gz && VERSION_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/latest | grep tag_name | cut -d '"' -f 4)
if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset";
else echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.0/apache2/conf.d/timezone.ini;
fi
SRC_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/tags/${VERSION_GLPI} | jq .assets[0].browser_download_url | tr -d \")
TAR_GLPI=$(basename ${SRC_GLPI})
FOLDER_GLPI=glpi/ FOLDER_GLPI=glpi/
FOLDER_WEB=/var/www/html/ FOLDER_WEB=/var/www/html/
#check if TLS_REQCERT is present
if !(grep -q "TLS_REQCERT" /etc/ldap/ldap.conf)
then
echo "TLS_REQCERT isn't present"
echo -e "TLS_REQCERT\tnever" >> /etc/ldap/ldap.conf
fi
#Téléchargement et extraction des sources de GLPI #Téléchargement et extraction des sources de GLPI
if [ "$(ls ${FOLDER_WEB}${FOLDER_GLPI})" ]; if [ "$(ls ${FOLDER_WEB}${FOLDER_GLPI})" ];
then then
@@ -23,5 +37,22 @@ echo -e "<VirtualHost *:80>\n\tDocumentRoot /var/www/html/glpi\n\n\t<Directory /
#Activation du module rewrite d'apache #Activation du module rewrite d'apache
a2enmod rewrite && service apache2 restart && service apache2 stop a2enmod rewrite && service apache2 restart && service apache2 stop
######################
# CRON CONFIGURATION #
######################
#Add scheduled task by cron and enable
echo "*/2 * * * * www-data /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" >> /etc/cron.d/glpi
#Start cron service
service cron start
######################
# SNMP CONFIGURATION #
######################
#Replace Listen localhot SNMP and restart service
sed -ie "s/agentAddress udp:127.0.0.1:161/agentAdrress udp:161/g" /etc/snmp/snmpd.conf
service snmpd restart
#Lancement du service apache au premier plan #Lancement du service apache au premier plan
/usr/sbin/apache2ctl -D FOREGROUND /usr/sbin/apache2ctl -D FOREGROUND