Skip to content

Commit

Permalink
Add GLPI Inventory plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
PPCM committed Jan 21, 2024
1 parent 1fdc5b0 commit 4e689cc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This package contains with:
- [More reporting](https://github.com/pluginsGLPI/mreporting)
- [News](https://github.com/pluginsGLPI/news)
- [Additional Reports](https://github.com/yllen/reports)
- [GLPI Inventory](https://github.com/glpi-project/glpi-inventory-plugin)

Description of each image
- ppcm/glpi-server : GLPI web server with the UI
Expand Down Expand Up @@ -98,13 +99,14 @@ For example, you can use the popular nginx-proxy and docker-letsencrypt-nginx-pr
| TZ | | X | X | X | Europe/Paris | Timezone of the web server |
| CRON_SCHEDULE | | X | | | */2 * * * * | Schedule in CRON format - [cron.guru](https://crontab.guru/) can help you to define it |
|
| PLUGIN_ACCOUNT_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin Accounts |
| PLUGIN_FIELDS_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin Fields |
| PLUGIN_MANAGEENTITIES_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin Manageentities |
| PLUGIN_MANUFACTURESIMPORTS_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin Manufacturesimports |
| PLUGIN_MREPORTING_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin More reporting |
| PLUGIN_NEWS_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin News |
| PLUGIN_REPORTS_ACTIVE | | | | X | 1 | Install / Update / Actuve Plugin Additional Reports |
| PLUGIN_ACCOUNT_ACTIVE | | | | X | 1 | Install / Update / Active Plugin Accounts |
| PLUGIN_FIELDS_ACTIVE | | | | X | 1 | Install / Update / Active Plugin Fields |
| PLUGIN_MANAGEENTITIES_ACTIVE | | | | X | 1 | Install / Update / Active Plugin Manageentities |
| PLUGIN_MANUFACTURESIMPORTS_ACTIVE | | | | X | 1 | Install / Update / Active Plugin Manufacturesimports |
| PLUGIN_MREPORTING_ACTIVE | | | | X | 1 | Install / Update / Active Plugin More reporting |
| PLUGIN_NEWS_ACTIVE | | | | X | 1 | Install / Update / Active Plugin News |
| PLUGIN_REPORTS_ACTIVE | | | | X | 1 | Install / Update / Active Plugin Additional Reports |
| PLUGIN_GLPIINVENTORY_ACTIVE | | | | X | 1 | Install / Update / Active Plugin GLPI Inventory |

For plugins variables, any content, except 0, will install, update and activate the plugin.

Expand Down
6 changes: 5 additions & 1 deletion glpi-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ENV PLUGIN_MANUFACTURESIMPORTS_VERSION="3.0.5"
ENV PLUGIN_MREPORTING_VERSION="1.8.4"
ENV PLUGIN_NEWS_VERSION="1.12.1"
ENV PLUGIN_REPORTS_VERSION="1.16.0"
ENV PLUGIN_GLPIINVENTORY_VERSION="1.3.4"

RUN apk --no-cache upgrade \
&& apk add --no-cache \
Expand Down Expand Up @@ -95,7 +96,10 @@ RUN \
# Installation of the plugin Additional reports
&& wget https://github.com/yllen/reports/releases/download/v${PLUGIN_REPORTS_VERSION}/glpi-reports-${PLUGIN_REPORTS_VERSION}.tar.gz \
&& tar xzf glpi-reports-${PLUGIN_REPORTS_VERSION}.tar.gz \
&& rm glpi-reports-${PLUGIN_REPORTS_VERSION}.tar.gz
&& rm glpi-reports-${PLUGIN_REPORTS_VERSION}.tar.gz \
&& wget https://github.com/glpi-project/glpi-inventory-plugin/releases/download/${PLUGIN_GLPIINVENTORY_VERSION}/glpi-glpiinventory-${PLUGIN_GLPIINVENTORY_VERSION}.tar.bz2 \
&& tar xjf glpi-glpiinventory-${PLUGIN_GLPIINVENTORY_VERSION}.tar.bz2 \
&& rm glpi-glpiinventory-${PLUGIN_GLPIINVENTORY_VERSION}.tar.bz2

# Copy specific config file
COPY downstream.php /var/www/glpi/inc
Expand Down
10 changes: 10 additions & 0 deletions glpi-server/start_glpi-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ if [ -z "${PLUGIN_REPORTS_ACTIVE}" ]
then
PLUGIN_REPORTS_ACTIVE=1
fi
if [ -z "${PLUGIN_GLPIINVENTORY_ACTIVE}" ]
then
PLUGIN_GLPIINVENTORY_ACTIVE=1
fi

# Modify default timezone for PHP
sed -i "s|;date.timezone =|date.timezone=${TZ}|" /etc/php82/php.ini
Expand Down Expand Up @@ -248,6 +252,12 @@ then
update_plugin 'reports' "${PLUGIN_REPORTS_VERSION}"
fi

# GLPI Inventory plugin
if [ -n "${PLUGIN_GLPIINVENTORY_ACTIVE}" ] && [ "${PLUGIN_GLPIINVENTORY_ACTIVE}" != "0" ]
then
update_plugin 'glpiinventory' "${PLUGIN_GLPIINVENTORY_VERSION}"
fi

# Remove glpi install directory
rm -rf '/var/www/glpi/install'

Expand Down

0 comments on commit 4e689cc

Please sign in to comment.