-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
services:
glpi:
image: glpi/glpi:latest
container_name: glpi
environment:
GLPI_DB_HOST: db
GLPI_DB_PORT: 3306
GLPI_DB_NAME: ${GLPI_DB_NAME}
GLPI_DB_USER: ${GLPI_DB_USER}
GLPI_DB_PASSWORD: ${GLPI_DB_PASSWORD}
GLPI_CRONTAB_ENABLED: ${GLPI_CRONTAB_ENABLED:-1}
ports:
- "8080:80"
volumes:
- glpi_data:/var/glpi
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: mariadb:10.11
container_name: glpi_db
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: ${GLPI_DB_NAME}
MARIADB_USER: ${GLPI_DB_USER}
MARIADB_PASSWORD: ${GLPI_DB_PASSWORD}
volumes:
- glpi_db:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -h localhost -u root -p$${MARIADB_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# MariaDB is NOT exposed on a host port.
# Only the glpi container can reach it over the internal Docker network.
volumes:
glpi_data:
glpi_db:
networks:
default:
name: glpi_network