-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
executable file
·94 lines (88 loc) · 2.08 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
services:
nginx:
image: "nginx:stable"
healthcheck:
test: [ "CMD-SHELL", "service nginx status || exit 1" ]
timeout: 2s
retries: 20
interval: 2s
volumes:
- ".:/var/www/html:rw"
- "./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro"
restart: "unless-stopped"
networks:
default:
aliases:
- "crm.press"
crm:
user: "${UID:-1000}:${GID:-1000}"
build:
context: "docker/php"
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
UNAME: ${UNAME:-docker}
extra_hosts:
- "docker:192.168.99.100"
volumes:
- ".:/var/www/html:rw"
depends_on:
nginx:
condition: service_healthy
mysql:
condition: service_healthy
redis:
condition: service_healthy
restart: "unless-stopped"
adminer:
user: "${UID:-1000}:${GID:-1000}"
build:
context: "docker/php"
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
UNAME: ${UNAME:-docker}
volumes:
- ".:/var/www/html:rw"
depends_on:
- "nginx"
- "mysql"
restart: "unless-stopped"
mysql:
image: "mysql:8.0"
volumes:
- "mysql-data:/var/lib/mysql"
- ".:/data"
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
- "--skip-character-set-client-handshake"
- "--explicit_defaults_for_timestamp"
- "--default-authentication-plugin=caching_sha2_password"
healthcheck:
test: [ "CMD", "mysqladmin" , "ping", "-h", "localhost" ]
timeout: 2s
retries: 20
interval: 2s
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_DATABASE: "crm"
restart: "unless-stopped"
redis:
image: "redis:6.2"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
timeout: 2s
retries: 20
interval: 2s
volumes:
- "redis-data:/data"
restart: "unless-stopped"
volumes:
mysql-data:
driver: local
redis-data:
driver: local
networks:
default: