Ajouter glpi/docker-entrypoint.sh
This commit is contained in:
parent
52e4ecf13b
commit
f7239d85c9
1 changed files with 25 additions and 0 deletions
25
glpi/docker-entrypoint.sh
Normal file
25
glpi/docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Applique la timezone système et PHP si définie
|
||||
if [ -n "$TZ" ]; then
|
||||
echo "Configuration du timezone système et PHP : $TZ"
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
echo "$TZ" > /etc/timezone
|
||||
|
||||
# Met à jour la timezone PHP-FPM
|
||||
if grep -q "^date.timezone" /etc/php.ini; then
|
||||
sed -i "s|^date.timezone =.*|date.timezone = $TZ|" /etc/php.ini
|
||||
else
|
||||
echo "date.timezone = $TZ" >> /etc/php.ini
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Injecte GLPI_FQDN dans le vhost
|
||||
GLPI_FQDN="${GLPI_FQDN:-localhost}"
|
||||
envsubst '${GLPI_FQDN}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
|
||||
echo 'php_value[session.save_path] = /var/www/html/files/_sessions' >> /etc/php-fpm.d/www.conf
|
||||
|
||||
# Lancer supervisord (gère nginx + php-fpm)
|
||||
exec /usr/bin/supervisord -c /etc/supervisord.conf
|
||||
Loading…
Add table
Add a link
Reference in a new issue