Skip to content

Commit

Permalink
minox fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
medilies committed Dec 11, 2021
1 parent 6ca8c76 commit c4f4ff6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ version: "3.3"
# -----------------------------------------------------------------------------

services:
glpidb:
db:
image: mysql:8.0.26
restart: always
networks:
- web-db
- admin-db
volumes:
- glpi_database:/var/lib/mysql # CHANGE
- database:/var/lib/mysql # CHANGE
- ./glpidb/scripts:/scripts
command: mysqld --default-authentication-plugin=mysql_native_password
secrets:
Expand All @@ -34,8 +34,8 @@ services:
timeout: 10s
retries: 10

glpi:
image: my_glpi # CHANGE
web:
image: glpi # CHANGE
build:
context: ./glpi
dockerfile: dockerfile
Expand All @@ -44,7 +44,7 @@ services:
networks:
- web-db
depends_on:
- glpidb
- db
ports:
- 50080:80 # CHANGE
volumes:
Expand All @@ -66,7 +66,7 @@ services:
phpmyadmin:
image: phpmyadmin:5.0-apache
depends_on:
- glpidb
- db
ports:
- 50180:80 # CHANGE
networks:
Expand All @@ -76,14 +76,14 @@ services:
environment:
- TZ=Africa/Algiers # CHANGE
- PMA_HOST_FILE=/run/secrets/DB_SERVER
- UPLOAD_LIMIT=300M
- UPLOAD_LIMIT=300M # CHANGE

networks:
web-db:
admin-db:

volumes:
glpi_database: # CHANGE
database: # CHANGE

secrets:
DB_SERVER:
Expand Down
3 changes: 2 additions & 1 deletion glpi/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN \
&& \
docker-php-ext-install exif \
&& \
apt-get install -y libpng-dev libjpeg-dev && \
apt-get install -y libpng-dev libjpeg-dev libwebp-dev && \
docker-php-ext-configure gd --with-jpeg --with-webp &&\
docker-php-ext-install gd \
&& \
apt-get install -y libc-client-dev libkrb5-dev && \
Expand Down
3 changes: 2 additions & 1 deletion glpi/scripts/files_backer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

# Script to create a web directory backup

TIMESTAMP=$(date +"%FT%H-%M-%S")
TIMESTAMP=$(date -u +"%FT%H-%M-%S")
TIMESTAMP=$(date +"%FT%H-%M-%S%z")
BACKUP_FILE_NAME=glpi_web_backup_"$TIMESTAMP"

tar ckzf /backups/"$BACKUP_FILE_NAME".tar.gz /var/www/html
2 changes: 1 addition & 1 deletion glpi/scripts/files_backer_cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# -----------------------------------------------------------------------------

# Script to create a cronjob for web directory backup
echo "*/1 * * * * root /scripts/files_backer.sh" >/etc/cron.d/files_backer &&
echo "0 */4 * * * root /scripts/files_backer.sh" >/etc/cron.d/files_backer &&
chown root /etc/cron.d/files_backer &&
chgrp root /etc/cron.d/files_backer &&
chmod 0700 /etc/cron.d/files_backer &&
Expand Down
1 change: 1 addition & 0 deletions glpi/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# -----------------------------------------------------------------------------

/scripts/install_glpi.sh
/scripts/files_backer_cron.sh
/scripts/install_fusioninventory.sh
/scripts/_install_datainjection.sh
/scripts/_install_mreporting.sh
Expand Down
2 changes: 1 addition & 1 deletion glpi/scripts/install_fusioninventory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ curl -L https://github.com/fusioninventory/fusioninventory-for-glpi/releases/dow
glpicli plugin:install fusioninventory -u glpi &&
glpicli plugin:activate fusioninventory &&
chown -R www-data /var/www/html &&
echo "* */6 * * * root php /var/www/html/front/cron.php &>/dev/null" >/etc/cron.d/fusioninventory_taskschedular &&
echo "* * * * * root php /var/www/html/front/cron.php &>/dev/null" >/etc/cron.d/fusioninventory_taskschedular &&
chown root /etc/cron.d/fusioninventory_taskschedular &&
chgrp root /etc/cron.d/fusioninventory_taskschedular &&
chmod 0700 /etc/cron.d/fusioninventory_taskschedular &&
Expand Down
2 changes: 1 addition & 1 deletion secrets/DB_SERVER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
glpidb
db

0 comments on commit c4f4ff6

Please sign in to comment.