-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
159 lines (155 loc) · 4.6 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: "3.5"
networks:
web:
external: true
services:
traefik:
image: "traefik:v2.3"
ports:
- "80:80"
- "443:443"
- "8080:8080"
- "3306:3306"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.local`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.service=api@internal"
# middleware redirect
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# global redirect to https
- "traefik.http.routers.redirs.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.redirs.entrypoints=web"
- "traefik.http.routers.redirs.middlewares=redirect-to-https"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./containers/traefik/certs:/certs:ro"
- "./containers/traefik/traefik.yml:/traefik.yml:ro"
- "./containers/traefik/dynamic.yml:/dynamic.yml:ro"
networks:
web:
aliases:
- magento.local
mailcatcher:
image: schickling/mailcatcher
labels:
- "traefik.enable=true"
- "traefik.http.routers.mailcatcher.rule=Host(`mailcatcher.local`)"
- "traefik.http.routers.mailcatcher.entrypoints=web"
- "traefik.http.services.mailcatcher.loadbalancer.server.port=1080"
hostname: mailcatcher.local
networks:
web:
aliases:
- mailcatcher.local
varnish:
image: varnish:6.0.3
hostname: magento.local
labels:
- "traefik.enable=true"
- "traefik.http.routers.varnish.rule=Host(`goldapple.local`)"
- "traefik.http.routers.varnish.entrypoints=websecure"
- "traefik.http.routers.varnish.tls=true"
networks:
- web
volumes:
- "./containers/varnish/default.vcl:/etc/varnish/default.vcl:ro"
depends_on:
- web
web:
image: nginx:latest
networks:
- web
volumes:
- "./www/html:/var/www/html"
- "./containers/nginx/default.conf:/etc/nginx/conf.d/default.conf"
depends_on:
- php
php:
build: "./containers/php"
container_name: "magento_php_1"
environment:
XDEBUG_CONFIG: remote_host=172.17.0.1
PHP_IDE_CONFIG: serverName=magento.local
networks:
- web
volumes:
- "./www:/var/www"
- "/usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro"
mysql:
environment:
MYSQL_PASSWORD: mage
MYSQL_USER: mage
MYSQL_DATABASE: magento
MYSQL_ROOT_PASSWORD: docker
image: mysql:5.7
hostname: magento.mysql.local
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.tcp.routers.mysql.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mysql.entrypoints=mysql"
- "traefik.tcp.services.mysql.loadbalancer.server.port=3306"
networks:
web:
aliases:
- magento.mysql.local
volumes:
- "./data/mysql:/var/lib/mysql"
es:
environment:
- discovery.type=single-node
build: "./containers/es"
hostname: magento.es.local
networks:
web:
aliases:
- magento.es.local
volumes:
- "./data/es:/usr/share/elasticsearch/data"
redis:
image: redis:5-buster
hostname: magento.redis.local
networks:
web:
aliases:
- magento.redis.local
volumes:
- "./data/redis:/data"
command: ["redis-server", "--appendonly", "yes"]
rabbit:
environment:
RABBITMQ_DEFAULT_USER: mage
RABBITMQ_DEFAULT_PASS: mage
image: rabbitmq:3.8-management
labels:
- "traefik.enable=true"
- "traefik.http.routers.rabbit.rule=Host(`magento.rabbit.local`)"
- "traefik.http.routers.rabbit.entrypoints=web"
- "traefik.http.services.rabbit.loadbalancer.server.port=15672"
hostname: magento.rabbit.local
networks:
web:
aliases:
- magento.rabbit.local
volumes:
- "./data/rabbitmq:/var/lib/rabbitmq"
zookeeper:
image: confluentinc/cp-zookeeper:5.5.0
hostname: magento.zookeeper.local
networks:
web:
aliases:
- magento.zookeeper.local
environment:
ZOOKEEPER_CLIENT_PORT: 2181
volumes:
- "./data/zookeeper:/var/lib/zookeeper"
ofelia:
image: mcuadros/ofelia:latest
networks:
- web
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./containers/ofelia/config.ini:/etc/ofelia/config.ini"