-
-
Notifications
You must be signed in to change notification settings - Fork 164
/
docker-compose.yml
113 lines (104 loc) · 2.31 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
version: '3.9'
services:
cron:
image: fballiano/magento2-cron:M2.4.6
depends_on:
- apache
- varnish
links:
- db
- cache
- sessions
- clusterdata
- apache
- varnish
- elasticsearch
volumes:
- type: bind
source: ./magento2
target: /var/www/html
consistency: delegated
- type: bind
source: ./varnish.secret
target: /varnish.secret
consistency: consistent
# Enable the next line if you want to add a custom php.ini
#- ./php.ini:/usr/local/etc/php/conf.d/999-customphp.ini
ssl:
image: fballiano/nginx-ssl-for-magento2
depends_on:
- varnish
links:
- varnish
ports:
- "443:443"
varnish:
image: varnish:7.1
ports:
- "80:80"
- "6082:6082"
depends_on:
- apache
links:
- apache
volumes:
- ./varnish.vcl:/etc/varnish/default.vcl
- ./varnish.secret:/etc/varnish/secret
environment:
- CACHE_SIZE=256M
apache:
image: fballiano/magento2-apache-php:M2.4.6
depends_on:
- db
- cache
- clusterdata
links:
- db
- cache
- sessions
- clusterdata
volumes:
- type: bind
source: ./magento2
target: /var/www/html
consistency: delegated
- ~/.composer/auth.json:/root/.composer/auth.json
# Enable the next line if you want to add a custom php.ini
#- ./php.ini:/usr/local/etc/php/conf.d/999-customphp.ini
db:
image: mysql:8.0
ports:
- "3306:3306"
volumes:
- type: volume
source: dbdata
target: /var/lib/mysql
consistency: delegated
environment:
- MYSQL_ROOT_PASSWORD=magento2
- MYSQL_DATABASE=magento2
- MYSQL_USER=magento2
- MYSQL_PASSWORD=magento2
elasticsearch:
image: elasticsearch:8.4.3
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
ports:
- "9300:9300"
- "9200:9200"
cache:
image: fballiano/redis-volatile:M2.4.6
clusterdata:
image: fballiano/redis-volatile:M2.4.6
sessions:
image: redis:6.2
volumes:
dbdata: