commit 096e79d02d914aee2776220dea06f192b628648b Author: Andrey Date: Mon Jan 5 22:54:23 2026 +0700 Добавить Readme diff --git a/Readme b/Readme new file mode 100644 index 0000000..fc6a18e --- /dev/null +++ b/Readme @@ -0,0 +1,41 @@ +nano docker-compose.yml + +services: + glpi: + image: "glpi/glpi:latest" + restart: "unless-stopped" + 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: + - "80:80" + + db: + image: "mysql" + restart: "unless-stopped" + volumes: + - "./storage/mysql:/var/lib/mysql" + environment: + MYSQL_RANDOM_ROOT_PASSWORD: "yes" + MYSQL_DATABASE: ${GLPI_DB_NAME} + MYSQL_USER: ${GLPI_DB_USER} + MYSQL_PASSWORD: ${GLPI_DB_PASSWORD} + healthcheck: + test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD + start_period: 5s + interval: 5s + timeout: 5s + retries: 10 + expose: + - "3306" + +nano .env + +GLPI_DB_HOST=db +GLPI_DB_PORT=3306 +GLPI_DB_NAME=glpi +GLPI_DB_USER=glpi +GLPI_DB_PASSWORD=glpi \ No newline at end of file