Closed killmasta93 closed 1 year ago
Did you figure this out? I am having the same issue. Looking for guidance.
I figured out my issue. Once I installed the docker image and ran install wizard. I did the following because I was getting the error under setup->general-> default values -> timezone -> error: timezone usage has not been activated. run the "php bin/console glpi:database:enable_timezones"
sudo docker exec -it mariadb sh
su root
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql
mysql -u root -p
GRANT SELECT ON mysql.time_zone_name TO 'glpidatabseuser'@'%';
flush privileges;
#exit mariadb container
sudo docker-compose restart
sudo docker exec -it gpli sh
su root
##Note volume path is different here
php /var/www/html/glpi/bin/console glpi:database:enable_timezones
Output returned: Timezone usage has been enabled.
version: "3.2"
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
volumes:
- /var/lib/mysql:/var/lib/mysql
env_file:
- .mariadb.env
restart: always
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "3001:80"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/www/html/glpi/:/var/www/html/glpi
environment:
- TIMEZONE=America/Los_Angeles
restart: always
MARIADB_ROOT_PASSWORD=YOURPASSWORDHERE
MARIADB_DATABASE=glpidb
MARIADB_USER=glpidatabseuser
MARIADB_PASSWORD=YOURPASSWORDHERE
Thank you so much that did the trick, any ideas why this happens?
Hi i was wondering if someone else has had this issue, currently installing GLPI using docker compose but when i check on timezone it shows on the general settings
The use of the time zone has not been activated. Run the command "php bin/console glpi:database:enable_timezones" to activate it.
Thank you