66 Commits
Author SHA1 Message Date
DiouxX de9d8b71c1 Fix issue vhost apache regarding GLPI version 2023-04-28 11:38:43 +02:00
DiouxX a0382c3c17 Merge pull request #86 from p1ne/master
Make apache config compatible with 10.0.7
2023-04-27 09:06:34 +02:00
p1ne 5e45330a44 Make apache config compatible with 10.0.7
See https://glpi-install.readthedocs.io/en/develop/prerequisites.html#apache-configuration for updated apache format
2023-04-25 17:12:02 +03:00
DiouxX 29142fb886 Add Github actions to Build and Push 2023-02-24 18:12:54 +01:00
DiouxX 6fa1854e7d Update components 2023-01-22 10:54:46 +01:00
DiouxX 9f3a81bbd9 Merge pull request #77 from paspo/redis
added redis package
2022-11-10 14:57:29 +01:00
Paolo Asperti ecf3657deb added redis package 2022-11-09 10:30:48 +01:00
DiouxX 845cc6516a Add mariadb.env 2022-04-08 16:17:59 +02:00
DiouxX 426fe39720 Replace mysql.env by mariadb.env 2022-04-08 16:17:06 +02:00
DiouxX e1cc6bcac5 Merge pull request #55 from DiouxX/revert-51-master
Revert "Extend the GLPI installed check"
2022-03-07 15:30:18 +01:00
DiouxX d3852d4f6b Revert "Extend the GLPI installed check" 2022-03-07 15:30:00 +01:00
DiouxX b9510bcaa5 Merge pull request #51 from monstermichl/master
Extend the GLPI installed check
2022-03-06 20:32:08 +01:00
DiouxX e9f73a6605 Merge pull request #52 from Toumash/feature/readme-default-credentials
add default accounts to the readme
2022-03-06 20:26:28 +01:00
Tomasz Dłuski 5eecfdaa37 add default accounts to the readme 2022-02-23 20:31:17 +01:00
monstermichl 5999b1641c Extend the GLPI installed check
Extending the GLPI installed check by making sure that not only the plugins folder is present. This way it is possible to install plugins before GLPI is started which makes it easier to build custom Docker images based on diouxx/glpi.
2022-02-18 08:17:27 +01:00
DiouxX 26b611dbb3 Merge pull request #47 from Tchello-Slackware/master
Update docker-compose.yml to correct misspelling
2022-01-29 07:40:06 +01:00
marcelorosa c76cef5961 Update docker-compose.yml 2022-01-26 09:52:48 -03:00
DiouxX 149b46e7a8 Move ldap dependances to Dockerfile 2021-12-28 09:07:14 +01:00
DiouxX 6a55753f85 Add a deployment of specific version wih docker-compose 2021-12-28 08:52:35 +01:00
DiouxX a0026fb9fa Update docker-compose file with mariadb 2021-12-26 11:04:58 +01:00
DiouxX c765097e12 Update Readme from mysql to mariadb 2021-12-14 20:44:41 +01:00
DiouxX cd34b15ae1 Replace deprecated MAINTAINER label 2021-12-13 09:27:16 +01:00
DiouxX 77f7fbb654 LDAP bug fix after upgarde to Debian 11 2021-12-13 09:24:33 +01:00
DiouxX d1d09adf30 Change the timezone files location to PHP7.4 2021-12-12 21:10:52 +01:00
DiouxX 7f71b6d621 Upgrade to Debian 11.1 and CVE-2021-40438 fix 2021-12-12 20:52:17 +01:00
DiouxX 3c9568c0ac Merge pull request #37 from psychoz971/master
Add Timezone support for php CLI
2021-08-05 08:09:33 +02:00
Laurent Vergerolle - IPEOS 41e43abf74 Add Timezone support for php CLI 2021-08-03 15:22:58 -04:00
DiouxX 4a32ee01ac Update mysql version 2021-07-11 11:15:35 +02:00
DiouxX dd0be24762 Merge pull request #30 from petersonbasso/update_dockerfile
Updating the dockerfile with some dependencies
2020-07-07 16:24:34 +02:00
Peterson Basso 2423b31052 update dockerfile with php extensions 2020-07-07 11:03:35 -03:00
DiouxX d9faa67a9f Reduce size with --no-install-recommends 2020-07-07 13:24:58 +02:00
DiouxX 9a94c82205 Fix Debian and PHP version 2020-07-06 16:04:57 +02:00
DiouxX 388dcf69a8 Add microbadge to readme 2019-10-02 22:28:59 +02:00
DiouxX 301356f819 Update README 2019-04-16 21:29:33 +02:00
DiouxX 438f401488 spelling error 2019-03-01 10:06:07 +01:00
DiouxX 687c0e28f1 Add docker-compose without persistance data to quickly test 2019-03-01 10:01:28 +01:00
DiouxX ec20aeb40e Update docker-compose section on README 2019-03-01 09:49:52 +01:00
DiouxX f7a9c4e92f Update Dpeloy GLPI persistance data section on README 2019-03-01 09:44:42 +01:00
DiouxX 6d3e390022 Update Deploy GLPI without database section on README 2019-03-01 09:30:01 +01:00
DiouxX 89427a845c modify docker-compose to remove obsolet links line 2019-03-01 09:13:07 +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
8 changed files with 296 additions and 69 deletions

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
name: Build & Publish Docker Image
on:
push:
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set output
id: vars
run: echo ::set-output name=tag::$
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: diouxx/glpi:latest
+1
View File
@@ -0,0 +1 @@
docker-compose-test.yml
+30 -12
View File
@@ -1,24 +1,42 @@
#On choisit une debian
FROM debian:latest
FROM debian:11.6
LABEL org.opencontainers.image.authors="github@diouxx.be"
MAINTAINER DiouxX "github@diouxx.be"
#Ne pas poser de question à l'installation
ENV DEBIAN_FRONTEND noninteractive
#Installation d'apache et de php5 avec extension
#Installation d'apache et de php7.4 avec extension
RUN apt update \
&& apt -y install \
&& apt install --yes --no-install-recommends \
apache2 \
php5 \
php5-mysql \
php5-ldap \
php5-xmlrpc \
php5-imap \
php7.4 \
php7.4-mysql \
php7.4-ldap \
php7.4-xmlrpc \
php7.4-imap \
curl \
php5-curl \
php5-gd \
wget
php7.4-curl \
php7.4-gd \
php7.4-mbstring \
php7.4-xml \
php7.4-apcu-bc \
php-cas \
php7.4-intl \
php7.4-zip \
php7.4-bz2 \
php7.4-redis \
cron \
wget \
ca-certificates \
jq \
libldap-2.4-2 \
libldap-common \
libsasl2-2 \
libsasl2-modules \
libsasl2-modules-db \
&& rm -rf /var/lib/apt/lists/*
#Copie et execution du script pour l'installation et l'initialisation de GLPI
COPY glpi-start.sh /opt/
+171 -14
View File
@@ -1,49 +1,206 @@
# Project to deploy GLPI with docker
[![](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")
![Docker Pulls](https://img.shields.io/docker/pulls/diouxx/glpi) ![Docker Stars](https://img.shields.io/docker/stars/diouxx/glpi) [![](https://images.microbadger.com/badges/image/diouxx/glpi.svg)](http://microbadger.com/images/diouxx/glpi "Get your own image badge on microbadger.com") ![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/diouxx/glpi)
# Table of Contents
- [Project to deploy GLPI with docker](#project-to-deploy-glpi-with-docker)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Default accounts](#default-accounts)
- [Deploy with CLI](#deploy-with-cli)
- [Deploy GLPI](#deploy-glpi)
- [Deploy GLPI with existing database](#deploy-glpi-with-existing-database)
- [Deploy GLPI with database and persistence data](#deploy-glpi-with-database-and-persistence-data)
- [Deploy a specific release of GLPI](#deploy-a-specific-release-of-glpi)
- [Deploy with docker-compose](#deploy-with-docker-compose)
- [Deploy without persistence data ( for quickly test )](#deploy-without-persistence-data--for-quickly-test-)
- [Deploy a specific release](#deploy-a-specific-release)
- [Deploy with persistence data](#deploy-with-persistence-data)
- [mariadb.env](#mariadbenv)
- [docker-compose .yml](#docker-compose-yml)
- [Environnment variables](#environnment-variables)
- [TIMEZONE](#timezone)
# Introduction
Install and run an GLPI instance with docker
## Deploy GLPI without database
## Default accounts
More info in the 📄[Docs](https://glpi-install.readthedocs.io/en/latest/install/wizard.html#end-of-installation)
| Login/Password | Role |
|-------------------- |------------------- |
| glpi/glpi | admin account |
| tech/tech | technical account |
| normal/normal | "normal" account |
| post-only/postonly | post-only account |
# Deploy with CLI
## Deploy GLPI
```sh
docker run --name glpi -p 80:80 -d diouxx/glpi
docker run --name mariadb -e MARIADB_ROOT_PASSWORD=diouxx -e MARIADB_DATABASE=glpidb -e MARIADB_USER=glpi_user -e MARIADB_PASSWORD=glpi -d mariadb:10.7
docker run --name glpi --link mariadb:mariadb -p 80:80 -d diouxx/glpi
```
## Deploy GLPI with existing database
```sh
docker run --name glpi --link yourdatabase:mysql -p 80:80 -d diouxx/glpi
docker run --name glpi --link yourdatabase:mariadb -p 80:80 -d diouxx/glpi
```
## Deploy GLPI with database and persistance container data (Recommended)
## Deploy GLPI with database and persistence 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 container with volumes to persistent data.
* First, create data container
* First, create MariaDB container with volume
```sh
docker create --name glpi-data --volume /var/www/html/glpi:/var/www/html/glpi busybox /bin/true
docker run --name mariadb -e MARIADB_ROOT_PASSWORD=diouxx -e MARIADB_DATABASE=glpidb -e MARIADB_USER=glpi_user -e MARIADB_PASSWORD=glpi --volume /var/lib/mysql:/var/lib/mysql -d mariadb:10.7
```
* Then, you link your data container with GLPI container
* Then, create GLPI container with volume and link MariaDB container
```sh
docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-data -p 80:80 -d diouxx/glpi
docker run --name glpi --link mariadb:mariadb --volume /var/www/html/glpi:/var/www/html/glpi -p 80:80 -d diouxx/glpi
```
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 set specific release.
Here an example for release 9.1.6 :
```sh
docker run --name glpi --hostname glpi --link mariadb:mariadb --volume /var/www/html/glpi:/var/www/html/glpi -p 80:80 --env "VERSION_GLPI=9.1.6" -d diouxx/glpi
```
To deploy with docker compose, you use *docker-compose.yml* and *mysql.env* file.
You can modify **_mysql.env_** to personalize settings like :
# Deploy with docker-compose
* MySQL root password
## Deploy without persistence data ( for quickly test )
```yaml
version: "3.8"
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
environment:
- MARIADB_ROOT_PASSWORD=password
- MARIADB_DATABASE=glpidb
- MARIADB_USER=glpi_user
- MARIADB_PASSWORD=glpi
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "80:80"
```
## Deploy a specific release
```yaml
version: "3.8"
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
environment:
- MARIADB_ROOT_PASSWORD=password
- MARIADB_DATABASE=glpidb
- MARIADB_USER=glpi_user
- MARIADB_PASSWORD=glpi
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
environment:
- VERSION_GLPI=9.5.6
ports:
- "80:80"
```
## Deploy with persistence data
To deploy with docker compose, you use *docker-compose.yml* and *mariadb.env* file.
You can modify **_mariadb.env_** to personalize settings like :
* MariaDB root password
* GLPI database
* GLPI user database
* GLPI user password
### mariadb.env
```
MARIADB_ROOT_PASSWORD=diouxx
MARIADB_DATABASE=glpidb
MARIADB_USER=glpi_user
MARIADB_PASSWORD=glpi
```
### docker-compose .yml
```yaml
version: "3.2"
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
volumes:
- /var/lib/mysql:/var/lib/mysql
env_file:
- ./mariadb.env
restart: always
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "80:80"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/www/html/glpi/:/var/www/html/glpi
environment:
- TIMEZONE=Europe/Brussels
restart: always
```
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 mariadb:mariadb --volumes-from glpi-data -p 80:80 --env "TIMEZONE=Europe/Brussels" -d diouxx/glpi
```
From docker-compose
Modify this settings
```yaml
environment:
TIMEZONE=Europe/Brussels
```
+25 -33
View File
@@ -1,36 +1,28 @@
#Mysql Persitance Data
mysql-data:
image: busybox
container_name: mysql-data
volumes:
- /var/lib/mysql:/var/lib/mysql
version: "3.2"
#Mysql Container
mysql:
image: mysql
container_name: mysql
hostname: mysql
volumes_from:
- mysql-data
env_file:
- ./mysql.env
#GLPI Pesitance Data
glpi-data:
image: busybox
container_name: glpi-data
volumes:
- /var/www/html/glpi:/var/www/html/glpi
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
volumes:
- /var/lib/mysql:/var/lib/mysql
env_file:
- ./mariadb.env
restart: always
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "80:80"
links:
- mysql:mysql
volumes_from:
- glpi-data
restart: always
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "80:80"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/www/html/glpi/:/var/www/html/glpi
environment:
- TIMEZONE=Europe/Brussels
restart: always
+38 -6
View File
@@ -1,8 +1,17 @@
#!/bin/bash
VERSION_GLPI=9.1.3
SRC_GLPI=https://github.com/glpi-project/glpi/releases/download/${VERSION_GLPI}/glpi-${VERSION_GLPI}.tgz
TAR_GLPI=glpi-${VERSION_GLPI}.tgz
#Controle du choix de version ou prise de la latest
[[ ! "$VERSION_GLPI" ]] \
&& 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.4/apache2/conf.d/timezone.ini;
echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.4/cli/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_WEB=/var/www/html/
@@ -10,7 +19,7 @@ FOLDER_WEB=/var/www/html/
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
echo -e "TLS_REQCERT\tnever" >> /etc/ldap/ldap.conf
fi
#Téléchargement et extraction des sources de GLPI
@@ -24,8 +33,31 @@ else
chown -R www-data:www-data ${FOLDER_WEB}${FOLDER_GLPI}
fi
#Modification du vhost par défaut
echo -e "<VirtualHost *:80>\n\tDocumentRoot /var/www/html/glpi\n\n\t<Directory /var/www/html/glpi>\n\t\tAllowOverride All\n\t\tOrder Allow,Deny\n\t\tAllow from all\n\t</Directory>\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n</VirtualHost>" > /etc/apache2/sites-available/000-default.conf
#Adapt the Apache server according to the version of GLPI installed
## Extract local version installed
LOCAL_GLPI_VERSION=$(ls ${FOLDER_WEB}/${FOLDER_GLPI}/version)
## Extract major version number
LOCAL_GLPI_MAJOR_VERSION=$(echo $LOCAL_GLPI_VERSION | cut -d. -f1)
## Remove dots from version string
LOCAL_GLPI_VERSION_NUM=${LOCAL_GLPI_VERSION//./}
## Target value is GLPI 1.0.7
TARGET_GLPI_VERSION="10.0.7"
TARGET_GLPI_VERSION_NUM=${TARGET_GLPI_VERSION//./}
TARGET_GLPI_MAJOR_VERSION=$(echo $TARGET_GLPI_VERSION | cut -d. -f1)
# Compare the numeric value of the version number to the target number
if [[ $LOCAL_GLPI_VERSION_NUM -lt $TARGET_GLPI_VERSION_NUM || $LOCAL_GLPI_MAJOR_VERSION -lt $TARGET_GLPI_MAJOR_VERSION ]]; then
echo -e "<VirtualHost *:80>\n\tDocumentRoot /var/www/html/glpi\n\n\t<Directory /var/www/html/glpi>\n\t\tAllowOverride All\n\t\tOrder Allow,Deny\n\t\tAllow from all\n\t</Directory>\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n</VirtualHost>" > /etc/apache2/sites-available/000-default.conf
else
set +H
echo -e "<VirtualHost *:80>\n\tDocumentRoot /var/www/html/glpi/public\n\n\t<Directory /var/www/html/glpi/public>\n\t\tRequire all granted\n\t\tRewriteEngine On\n\t\tRewriteCond %{REQUEST_FILENAME} !-f\n\t\n\t\tRewriteRule ^(.*)$ index.php [QSA,L]\n\t</Directory>\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n</VirtualHost>" > /etc/apache2/sites-available/000-default.conf
fi
#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
#Activation du module rewrite d'apache
a2enmod rewrite && service apache2 restart && service apache2 stop
+4
View File
@@ -0,0 +1,4 @@
MARIADB_ROOT_PASSWORD=diouxx
MARIADB_DATABASE=glpidb
MARIADB_USER=glpi_user
MARIADB_PASSWORD=glpi
-4
View File
@@ -1,4 +0,0 @@
MYSQL_ROOT_PASSWORD=diouxx
MYSQL_DATABASE=glpidb
MYSQL_USER=glpi_user
MYSQL_PASSWORD=glpi