31 Commits
Author SHA1 Message Date
DiouxX f8ceba3d73 Add Docker build and push to dev branch 2024-03-22 13:38:30 +01:00
DiouxX fb5f49768c Merge pull request #111 from DiouxX/debian12
Debian12
2024-03-22 12:02:44 +01:00
DiouxX 3f9a84e253 Merge branch 'dev' into debian12 2024-03-22 11:56:42 +01:00
DiouxX a91721b753 Upgrade to Debian 12 2024-03-22 11:46:13 +01:00
DiouxX b97b32ebe1 Merge pull request #105 from levihb/master
Fix setting of session.cookie.httponly if already set
2024-03-01 15:39:07 +01:00
levihb af603af7b5 Fix setting of session.cookie.httponly if already set 2024-02-28 17:31:13 +00:00
DiouxX bfaaca8657 Merge pull request #102 from hirenshah/patch-1
Set session.cookie_httponly to "on" in glpi-start.sh
2024-01-28 16:49:16 +01:00
DiouxX 760591083b Merge pull request #100 from angy91m/master
Fix to kill apache before start it
2024-01-24 10:53:09 +01:00
Hiren Shah f5062eeb6d Set session.cookie_httponly to "on" in glpi-start.sh 2024-01-18 22:44:31 +00:00
DiouxX 0bb48db140 Merge pull request #71 from OlivierGuilloux/do_curl_only_if_necessary
Do curl only if necessary
2024-01-10 13:57:28 +01:00
Angelo Burzi 9e702defa9 updated 2024-01-10 10:33:30 +01:00
angy91m 2b4db4ea20 Fix to kill apache before start it
It's necessary because 'service apache2 stop' leaves some process alive
2023-12-15 18:41:10 +01:00
DiouxX fdbe308a26 Set up CI with Azure Pipelines
[skip ci]
2023-12-01 14:12:07 +01:00
DiouxX 65446fd9fe Merge pull request #96 from vladkvl13/patch-1
Update glpi-start.sh
2023-10-22 19:57:43 +02:00
vladkvl13 1051a4f1cf Update glpi-start.sh
When the container starts, this command append the line every time. After 13 months of daily container restarts (because of bareos backup), whe have /etc/cron.d/glpi with more than 500+ line of similar crons. This make a critical CPU utilize on server. After changes all works fine.
2023-07-20 08:31:31 +03:00
DiouxX e4d30f8337 Merge pull request #91 from DiouxX/issue-apache
Fix issue vhost apache regarding GLPI version
2023-04-28 11:43:45 +02:00
DiouxX de9d8b71c1 Fix issue vhost apache regarding GLPI version 2023-04-28 11:38:43 +02:00
DiouxX 69940f5ec1 Fix issue after update to php 8 2023-04-27 17:28:11 +02:00
DiouxX 37c78566b4 Merge pull request #87 from DiouxX/dev-php8
Update to PHP8.1
2023-04-27 10:09:22 +02:00
DiouxX 9f39374d7e Update to PHP8.1 2023-04-27 10:03:55 +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
Olivier Guilloux 520c287fe1 Do curl only if necessary 2022-08-22 14:18:42 +02: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 58ff53e00b Add SNMP package 2018-12-28 10:19:45 +01:00
7 changed files with 109 additions and 30 deletions

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
name: Build & Publish Dev Docker image
on:
push:
branches:
- "dev"
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5.3.0
with:
push: true
tags: diouxx/glpi:dev
+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
+3
View File
@@ -1 +1,4 @@
docker-compose-test.yml docker-compose-test.yml
cust-entry.sh
data
start-docker.sh
+20 -19
View File
@@ -1,5 +1,5 @@
#On choisit une debian #On choisit une debian
FROM debian:11.1 FROM debian:12.5
LABEL org.opencontainers.image.authors="github@diouxx.be" LABEL org.opencontainers.image.authors="github@diouxx.be"
@@ -7,30 +7,31 @@ LABEL org.opencontainers.image.authors="github@diouxx.be"
#Ne pas poser de question à l'installation #Ne pas poser de question à l'installation
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
#Installation d'apache et de php7.4 avec extension #Installation d'apache et de php8.3 avec extension
RUN apt update \ RUN apt update \
&& apt install --yes ca-certificates apt-transport-https lsb-release wget curl \
&& curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \
&& sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \
&& apt update \
&& apt install --yes --no-install-recommends \ && apt install --yes --no-install-recommends \
apache2 \ apache2 \
php7.4 \ php8.3 \
php7.4-mysql \ php8.3-mysql \
php7.4-ldap \ php8.3-ldap \
php7.4-xmlrpc \ php8.3-xmlrpc \
php7.4-imap \ php8.3-imap \
curl \ php8.3-curl \
php7.4-curl \ php8.3-gd \
php7.4-gd \ php8.3-mbstring \
php7.4-mbstring \ php8.3-xml \
php7.4-xml \
php7.4-apcu-bc \
php-cas \ php-cas \
php7.4-intl \ php8.3-intl \
php7.4-zip \ php8.3-zip \
php7.4-bz2 \ php8.3-bz2 \
php8.3-redis \
cron \ cron \
wget \
ca-certificates \
jq \ jq \
libldap-2.4-2 \ libldap-2.5-0 \
libldap-common \ libldap-common \
libsasl2-2 \ libsasl2-2 \
libsasl2-modules \ libsasl2-modules \
+32 -7
View File
@@ -6,12 +6,13 @@
if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset"; if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset";
else else
echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.4/apache2/conf.d/timezone.ini; echo "date.timezone = \"$TIMEZONE\"" > /etc/php/8.3/apache2/conf.d/timezone.ini;
echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.4/cli/conf.d/timezone.ini; echo "date.timezone = \"$TIMEZONE\"" > /etc/php/8.3/cli/conf.d/timezone.ini;
fi 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 \") #Enable session.cookie_httponly
TAR_GLPI=$(basename ${SRC_GLPI}) sed -i 's,session.cookie_httponly = *\(on\|off\|true\|false\|0\|1\)\?,session.cookie_httponly = on,gi' /etc/php/8.3/apache2/php.ini
FOLDER_GLPI=glpi/ FOLDER_GLPI=glpi/
FOLDER_WEB=/var/www/html/ FOLDER_WEB=/var/www/html/
@@ -27,22 +28,46 @@ if [ "$(ls ${FOLDER_WEB}${FOLDER_GLPI})" ];
then then
echo "GLPI is already installed" echo "GLPI is already installed"
else else
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})
wget -P ${FOLDER_WEB} ${SRC_GLPI} wget -P ${FOLDER_WEB} ${SRC_GLPI}
tar -xzf ${FOLDER_WEB}${TAR_GLPI} -C ${FOLDER_WEB} tar -xzf ${FOLDER_WEB}${TAR_GLPI} -C ${FOLDER_WEB}
rm -Rf ${FOLDER_WEB}${TAR_GLPI} rm -Rf ${FOLDER_WEB}${TAR_GLPI}
chown -R www-data:www-data ${FOLDER_WEB}${FOLDER_GLPI} chown -R www-data:www-data ${FOLDER_WEB}${FOLDER_GLPI}
fi fi
#Modification du vhost par défaut #Adapt the Apache server according to the version of GLPI installed
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 ## 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 #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 echo "*/2 * * * * www-data /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" > /etc/cron.d/glpi
#Start cron service #Start cron service
service cron start service cron start
#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
#Fix to really stop apache
pkill -9 apache
#Lancement du service apache au premier plan #Lancement du service apache au premier plan
/usr/sbin/apache2ctl -D FOREGROUND /usr/sbin/apache2ctl -D FOREGROUND
+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