mirror of
https://github.com/DiouxX/docker-glpi.git
synced 2026-11-07 15:32:33 -05:00
Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0342a357f | ||
|
|
6da5988ef3 | ||
|
|
7f7075bf06 | ||
|
|
b97b32ebe1 | ||
|
|
af603af7b5 | ||
|
|
bfaaca8657 | ||
|
|
760591083b | ||
|
|
f5062eeb6d | ||
|
|
0bb48db140 | ||
|
|
9e702defa9 | ||
|
|
2b4db4ea20 | ||
|
|
fdbe308a26 | ||
|
|
65446fd9fe | ||
|
|
1051a4f1cf | ||
|
|
e4d30f8337 | ||
|
|
69940f5ec1 | ||
|
|
37c78566b4 | ||
|
|
9f39374d7e | ||
|
|
520c287fe1 |
No files matched your search
@@ -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
|
||||||
@@ -1 +1,4 @@
|
|||||||
docker-compose-test.yml
|
docker-compose-test.yml
|
||||||
|
cust-entry.sh
|
||||||
|
data
|
||||||
|
start-docker.sh
|
||||||
+18
-18
@@ -7,29 +7,29 @@ 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.1 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.1 \
|
||||||
php7.4-mysql \
|
php8.1-mysql \
|
||||||
php7.4-ldap \
|
php8.1-ldap \
|
||||||
php7.4-xmlrpc \
|
php8.1-xmlrpc \
|
||||||
php7.4-imap \
|
php8.1-imap \
|
||||||
curl \
|
php8.1-curl \
|
||||||
php7.4-curl \
|
php8.1-gd \
|
||||||
php7.4-gd \
|
php8.1-mbstring \
|
||||||
php7.4-mbstring \
|
php8.1-xml \
|
||||||
php7.4-xml \
|
|
||||||
php7.4-apcu-bc \
|
|
||||||
php-cas \
|
php-cas \
|
||||||
php7.4-intl \
|
php8.1-intl \
|
||||||
php7.4-zip \
|
php8.1-zip \
|
||||||
php7.4-bz2 \
|
php8.1-bz2 \
|
||||||
php7.4-redis \
|
php8.1-redis \
|
||||||
cron \
|
cron \
|
||||||
wget \
|
|
||||||
ca-certificates \
|
|
||||||
jq \
|
jq \
|
||||||
libldap-2.4-2 \
|
libldap-2.4-2 \
|
||||||
libldap-common \
|
libldap-common \
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Starter pipeline
|
||||||
|
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||||
|
# Add steps that build, run tests, deploy, and more:
|
||||||
|
# https://aka.ms/yaml
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
- master
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: WhiteSource@21
|
||||||
|
inputs:
|
||||||
|
cwd: '$(System.DefaultWorkingDirectory)'
|
||||||
+12
-5
@@ -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.1/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.1/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.1/apache2/php.ini
|
||||||
|
|
||||||
FOLDER_GLPI=glpi/
|
FOLDER_GLPI=glpi/
|
||||||
FOLDER_WEB=/var/www/html/
|
FOLDER_WEB=/var/www/html/
|
||||||
|
|
||||||
@@ -27,6 +28,9 @@ 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}
|
||||||
@@ -55,12 +59,15 @@ else
|
|||||||
fi
|
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
|
||||||
Reference in new issue
Block a user