docker-glpi : glpi 11 ..
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
# vagrant
|
# vagrant
|
||||||
|
|
||||||
le 2025-09-25 13h30 - ps
|
le 2025-11-25 13h30 - ps
|
||||||
|
|
||||||
Ce dépôt héberge des **Vagrantfile** dont :
|
Ce dépôt héberge des **Vagrantfile** dont :
|
||||||
* **dns** : Vagrantfile pour 2 serveurs **Bind9** (1 maitre et un esclave), tests **goss** chainés
|
* **dns** : Vagrantfile pour 2 serveurs **Bind9** (1 maitre et un esclave), tests **goss** chainés
|
||||||
* **divers/logs** : Vagrantfile pour serveur et client **rsyslog** sans journald
|
* **divers/logs** : Vagrantfile pour serveur et client **rsyslog** sans journald
|
||||||
* **docker**
|
* **docker**
|
||||||
* **docker-wordpress**
|
* **docker-wordpress**
|
||||||
* **docker-glpi**
|
* **docker-glpi** : Vagrantfile pour GLPI 11.0 avec docker - VM Debian 12
|
||||||
* **docker-elk**
|
* **docker-elk**
|
||||||
* **docker-traefik-nextcloud**
|
* **docker-traefik-nextcloud**
|
||||||
* **docker-traefik-nextcloud-ss-tls**
|
* **docker-traefik-nextcloud-ss-tls**
|
||||||
|
|||||||
71
docker-glpi/Vagrantfile
vendored
71
docker-glpi/Vagrantfile
vendored
@@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|
|
|||||||
|
|
||||||
# Every Vagrant development environment requires a box. You can search for
|
# Every Vagrant development environment requires a box. You can search for
|
||||||
# boxes at https://vagrantcloud.com/search.
|
# boxes at https://vagrantcloud.com/search.
|
||||||
config.vm.box = "debian/bullseye64"
|
config.vm.box = "debian/bookworm64"
|
||||||
config.vm.hostname = "glpi"
|
config.vm.hostname = "glpi"
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
# Disable automatic box update checking. If you disable this, then
|
||||||
@@ -65,6 +65,7 @@ Vagrant.configure("2") do |config|
|
|||||||
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
|
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
|
||||||
# documentation for more information about their specific syntax and use.
|
# documentation for more information about their specific syntax and use.
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
|
timedatectl set-timezone Europe/Paris
|
||||||
apt-get update
|
apt-get update
|
||||||
apt install -y wget curl git vim
|
apt install -y wget curl git vim
|
||||||
if ! which docker ; then
|
if ! which docker ; then
|
||||||
@@ -73,44 +74,54 @@ Vagrant.configure("2") do |config|
|
|||||||
gpasswd -a vagrant docker
|
gpasswd -a vagrant docker
|
||||||
fi
|
fi
|
||||||
mkdir -p docker/glpi && cd docker/glpi
|
mkdir -p docker/glpi && cd docker/glpi
|
||||||
cat > docker-compose.yml <<-EOT
|
cat > compose.yml <<-EOT
|
||||||
version: "3.2"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
#MariaDB Container
|
|
||||||
mariadb:
|
|
||||||
image: mariadb:10.7
|
|
||||||
container_name: mariadb
|
|
||||||
hostname: mariadb
|
|
||||||
volumes:
|
|
||||||
- ./mysql:/var/lib/mysql
|
|
||||||
env_file:
|
|
||||||
- ./mariadb.env
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
#GLPI Container
|
|
||||||
glpi:
|
glpi:
|
||||||
image: diouxx/glpi
|
image: "glpi/glpi:latest"
|
||||||
container_name: glpi
|
restart: "unless-stopped"
|
||||||
hostname: glpi
|
volumes:
|
||||||
|
- "./storage/glpi:/var/glpi:rw"
|
||||||
|
env_file: .env # Pass environment variables from .env file to the container
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
|
||||||
- /etc/timezone:/etc/timezone:ro
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
- /var/www/html/glpi/:/var/www/html/glpi
|
|
||||||
environment:
|
environment:
|
||||||
- TIMEZONE=Europe/Paris
|
- TIMEZONE=Europe/Paris
|
||||||
restart: always
|
|
||||||
|
db:
|
||||||
|
image: "mariadb"
|
||||||
|
restart: "unless-stopped"
|
||||||
|
volumes:
|
||||||
|
- "./storage/mysql:/var/lib/mysql"
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
environment:
|
||||||
|
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
|
||||||
|
MYSQL_DATABASE: ${GLPI_DB_NAME}
|
||||||
|
MYSQL_USER: ${GLPI_DB_USER}
|
||||||
|
MYSQL_PASSWORD: ${GLPI_DB_PASSWORD}
|
||||||
|
healthcheck:
|
||||||
|
#test: mariadbadmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
|
||||||
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||||
|
start_period: 5s
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
expose:
|
||||||
|
- "3306"
|
||||||
EOT
|
EOT
|
||||||
cat > mariadb.env <<-EOT
|
|
||||||
MARIADB_ROOT_PASSWORD=diouxx
|
cat > .env <<-EOT
|
||||||
MARIADB_DATABASE=glpidb
|
GLPI_DB_HOST=db
|
||||||
MARIADB_USER=glpi_user
|
GLPI_DB_PORT=3306
|
||||||
MARIADB_PASSWORD=glpi
|
GLPI_DB_NAME=glpi
|
||||||
|
GLPI_DB_USER=glpi
|
||||||
|
GLPI_DB_PASSWORD=glpi
|
||||||
EOT
|
EOT
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
ip -br a
|
ip -br a
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user