-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
126 lines (117 loc) · 3.42 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
122
123
124
125
126
version: '3.5'
services:
# MySQL
magento2-database:
image: mysql:5.7
container_name: magento2-database
volumes:
- ${PWD}/.docker/mysql/data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=magento2
networks:
- net_magento2
# PHPMyAdmin
magento2-phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: magento2-phpmyadmin
ports:
- 8080:80
depends_on:
- magento2-database
links:
- magento2-database:db
networks:
- net_magento2
# Nginx
magento2-nginx:
image: nginx
container_name: magento2-nginx
ports:
- 80:80
- 443:443
volumes:
- ${PWD}/magento2:/var/www/html
- ${PWD}/.docker/nginx/certs:/etc/nginx/certs
- ${PWD}/.docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ${PWD}/.docker/nginx/fastcgi_params:/etc/nginx/fastcgi_params
- ${PWD}/.docker/nginx/magento2.conf:/etc/nginx/sites-enable/magento2.conf
- ${PWD}/.docker/nginx/localhost.conf:/etc/nginx/sites-enable/localhost.conf
depends_on:
- magento2-php-fpm-pool1
- magento2-php-fpm-pool2
- magento2-php-fpm-pool3
- magento2-php-fpm-xdebug
links:
- magento2-php-fpm-pool1
- magento2-php-fpm-pool2
- magento2-php-fpm-pool3
- magento2-php-fpm-xdebug
networks:
- net_magento2
# PHP pool 1
magento2-php-fpm-pool1:
image: 00f100/magento-php-fpm:7.2.20-alpine
container_name: magento2-php-fpm-pool1
depends_on:
- magento2-database
links:
- magento2-database
volumes:
- ${PWD}/magento2:/var/www/html
- ${PWD}/.docker/php/fpm/php-fpm.conf:/opt/php/etc/php-fpm.conf
- ${PWD}/.docker/php/fpm/php.ini:/opt/php/fpm/php.ini
- ${PWD}/.docker/php/fpm/www.conf:/opt/php/etc/php-fpm.d/www.conf
networks:
- net_magento2
# PHP pool 2
magento2-php-fpm-pool2:
image: 00f100/magento-php-fpm:7.2.20-alpine
container_name: magento2-php-fpm-pool2
depends_on:
- magento2-database
links:
- magento2-database
volumes:
- ${PWD}/magento2:/var/www/html
- ${PWD}/.docker/php/fpm/php-fpm.conf:/opt/php/etc/php-fpm.conf
- ${PWD}/.docker/php/fpm/php.ini:/opt/php/fpm/php.ini
- ${PWD}/.docker/php/fpm/www.conf:/opt/php/etc/php-fpm.d/www.conf
networks:
- net_magento2
# PHP pool 3
magento2-php-fpm-pool3:
image: 00f100/magento-php-fpm:7.2.20-alpine
container_name: magento2-php-fpm-pool3
depends_on:
- magento2-database
links:
- magento2-database
volumes:
- ${PWD}/magento2:/var/www/html
- ${PWD}/.docker/php/fpm/php-fpm.conf:/opt/php/etc/php-fpm.conf
- ${PWD}/.docker/php/fpm/php.ini:/opt/php/fpm/php.ini
- ${PWD}/.docker/php/fpm/www.conf:/opt/php/etc/php-fpm.d/www.conf
networks:
- net_magento2
# PHP pool with xdebug
magento2-php-fpm-xdebug:
image: 00f100/magento-php-fpm:7.2.20-alpine
container_name: magento2-php-fpm-xdebug
ports:
- 9000:9000
depends_on:
- magento2-database
links:
- magento2-database
volumes:
- ${PWD}/magento2:/var/www/html
- ${PWD}/.docker/php/fpm/php-fpm.conf:/opt/php/etc/php-fpm.conf
- ${PWD}/.docker/php/fpm/php-xdebug.ini:/opt/php/fpm/php.ini
- ${PWD}/.docker/php/fpm/www.conf:/opt/php/etc/php-fpm.d/www.conf
networks:
- net_magento2
networks:
net_magento2:
name: net_magento2
driver: bridge