-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
107 lines (100 loc) · 2.63 KB
/
docker-compose.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "3.3"
#
# Writter : Boudouma Mohamed Ilies (medilies)
# Github repo: https://github.com/medilies/glpi
# My Linkedin: https://www.linkedin.com/in/medilies/
# -----------------------------------------------------------------------------
services:
db:
image: glpidb # CHANGE
build:
context: ./glpidb
dockerfile: Dockerfile
# args:
restart: always
networks:
- web-db
- admin-db
volumes:
- database:/var/lib/mysql # CHANGE
- ./glpidb/scripts:/scripts # [OPTIONAL for live editing / dev]
- ./stack_dumps/db_backups:/backups
command: mysqld --default-authentication-plugin=mysql_native_password
secrets:
- MYSQL_DATABASE
- MYSQL_ROOT_PASSWORD
- MYSQL_USER
- MYSQL_PASSWORD
environment:
- TZ=Africa/Algiers # CHANGE
- MYSQL_DATABASE_FILE=/run/secrets/MYSQL_DATABASE
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
- MYSQL_USER_FILE=/run/secrets/MYSQL_USER
- MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD
# - MYSQL_INITDB_SKIP_TZINFO
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 20s
timeout: 10s
retries: 10
web:
image: glpi # CHANGE
build:
context: ./glpi
dockerfile: Dockerfile
# args:
restart: always
networks:
- web-db
depends_on:
- db
ports:
- 50080:80 # CHANGE
volumes:
- ./glpi/scripts:/scripts # [OPTIONAL for live editing / dev]
- ./stack_dumps/web_files_backups:/backups
secrets:
- DB_SERVER
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
environment:
- GLPI_ROOT_PATH=/var/www/html
- TZ=Africa/Algiers # CHANGE
- MYSQL_DATABASE_FILE=/run/secrets/MYSQL_DATABASE
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
- MYSQL_USER_FILE=/run/secrets/MYSQL_USER
- MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD
phpmyadmin:
image: phpmyadmin:5.0-apache
depends_on:
- db
ports:
- 50180:80 # CHANGE
networks:
- admin-db
secrets:
- DB_SERVER
environment:
- TZ=Africa/Algiers # CHANGE
- PMA_HOST_FILE=/run/secrets/DB_SERVER
- UPLOAD_LIMIT=300M # CHANGE
networks:
web-db:
admin-db:
volumes:
database:
# CHANGE
secrets:
DB_SERVER:
file: ./secrets/DB_SERVER
MYSQL_DATABASE:
file: ./secrets/MYSQL_DATABASE
DB_USERNAME_ROOT:
file: ./secrets/DB_USERNAME_ROOT
MYSQL_ROOT_PASSWORD:
file: ./secrets/MYSQL_ROOT_PASSWORD
MYSQL_USER:
file: ./secrets/MYSQL_USER
MYSQL_PASSWORD:
file: ./secrets/MYSQL_PASSWORD