mirror of
https://github.com/DiouxX/docker-glpi.git
synced 2026-11-07 15:32:33 -05:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de9d8b71c1 | ||
|
|
a0382c3c17 | ||
|
|
5e45330a44 | ||
|
|
29142fb886 | ||
|
|
6fa1854e7d | ||
|
|
9f3a81bbd9 | ||
|
|
ecf3657deb | ||
|
|
845cc6516a | ||
|
|
426fe39720 | ||
|
|
e1cc6bcac5 |
No files matched your search
@@ -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
|
||||||
+2
-1
@@ -1,5 +1,5 @@
|
|||||||
#On choisit une debian
|
#On choisit une debian
|
||||||
FROM debian:11.1
|
FROM debian:11.6
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="github@diouxx.be"
|
LABEL org.opencontainers.image.authors="github@diouxx.be"
|
||||||
|
|
||||||
@@ -26,6 +26,7 @@ php-cas \
|
|||||||
php7.4-intl \
|
php7.4-intl \
|
||||||
php7.4-zip \
|
php7.4-zip \
|
||||||
php7.4-bz2 \
|
php7.4-bz2 \
|
||||||
|
php7.4-redis \
|
||||||
cron \
|
cron \
|
||||||
wget \
|
wget \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
|||||||
+19
-1
@@ -33,8 +33,26 @@ else
|
|||||||
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
|
||||||
|
## 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
|
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
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
MARIADB_ROOT_PASSWORD=diouxx
|
||||||
|
MARIADB_DATABASE=glpidb
|
||||||
|
MARIADB_USER=glpi_user
|
||||||
|
MARIADB_PASSWORD=glpi
|
||||||
Reference in new issue
Block a user