-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·121 lines (113 loc) · 2.78 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: '3'
networks:
projects_network:
name: projects_network
services:
app_server:
container_name: app_server
build:
context: .
dockerfile: ./docker/Dockerfile
ports:
- ${APP_PORT}:443
working_dir: /var/www/html
volumes:
- .:/var/www/html
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
depends_on:
db_server:
condition: service_healthy
networks:
- projects_network
db_server:
container_name: db_server
image: mysql
ports:
- ${DB_PORT}:3306
command: [
'--default_authentication_plugin=mysql_native_password',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
volumes:
- ./docker/db:/docker-entrypoint-initdb.d
- db_data:/var/lib/mysql
environment:
MYSQL_TCP_PORT: "3306"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_USER: "${DB_USER}"
MYSQL_PASSWORD: "${DB_USER_PASSWORD}"
restart: always
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$DB_ROOT_PASSWORD
start_period: 5s
interval: 5s
timeout: 5s
retries: 20
networks:
- projects_network
adminer:
container_name: adminer
image: adminer
restart: always
ports:
- ${ADMINER_PORT}:${ADMINER_PORT}
volumes:
- adminer_data:/var/www/html
depends_on:
db_server:
condition: service_healthy
networks:
- projects_network
phpmyadmin:
container_name: phpmyadmin
image: phpmyadmin
restart: always
ports:
- ${PHPMYADMIN_PORT}:${PHPMYADMIN_PORT}
volumes:
- phpmyadmin_data:/var/www/html
environment:
APACHE_PORT: "${PHPMYADMIN_PORT}"
PMA_ARBITRARY: "1"
PMA_HOST: db_server
PMA_PMADB: "pmadb"
depends_on:
db_server:
condition: service_healthy
networks:
- projects_network
redis_server:
container_name: redis_server
image: redis:latest
restart: always
ports:
- ${REDIS_PORT}:6379
command: redis-server --save 60 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- redis_data:/data
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"
REDIS_PORT: "${REDIS_PORT}"
networks:
- projects_network
redis_webui:
container_name: redis_webui
image: erikdubbelboer/phpredisadmin
ports:
- "${REDIS_WEBUI_PORT}:80"
environment:
ADMIN_USER: "${REDIS_WEBUI_USER}"
ADMIN_PASS: "${REDIS_WEBUI_PASSWORD}"
REDIS_1_HOST: redis_server
REDIS_1_PORT: "${REDIS_PORT}"
REDIS_1_AUTH: "${REDIS_PASSWORD}"
depends_on:
- redis_server
networks:
- projects_network
volumes:
db_data:
adminer_data:
phpmyadmin_data: