-
Notifications
You must be signed in to change notification settings - Fork 314
/
docker-compose.yml
146 lines (145 loc) · 3.2 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
version: '3'
services:
app:
image: scandipwa/base:${PROJECT_IMAGE}
build:
context: .
args:
- COMPOSER_VERSION=${COMPOSER_VERSION}
- PROJECT_TAG=${PROJECT_TAG}
- NODEJS_DIR=${NODEJS_DIR}
- BASEPATH=${BASEPATH}
restart: on-failure:5
env_file:
- .application
- .env
environment:
- COMPOSER_AUTH
- COMPOSER_CACHE_DIR=/tmp/composer_cache
- BASEPATH=${BASEPATH}
- PROJECT_TAG=${PROJECT_TAG}
- NODEJS_DIR=${NODEJS_DIR}
volumes:
- app-data:/var/www/public
expose:
- 9000
networks:
- default
command: /wait-for-it.sh mysql:3306 -- /wait-for-it.sh varnish:80 -- /start.sh
entrypoint: /usr/local/bin/entrypoint.sh
depends_on:
- redis
- mysql
- elasticsearch
varnish:
image: scandipwa/varnish:latest
build:
context: build/varnish
restart: on-failure:30
env_file:
- .env
volumes:
- ./deploy/shared/conf/varnish/default.vcl:/etc/varnish/default.vcl
expose:
- 80
ports:
- ${VARNISH_PORT}:80
networks:
- default
nginx:
image: nginx:${NGINX_VERSION}
restart: on-failure:30
volumes:
- ./deploy/shared/conf/nginx/magento.conf:/etc/nginx/conf.d/default.conf
- ./deploy/shared/conf/nginx/cache-router.conf:/etc/nginx/conf.d/cache-router.conf
- app-data:/var/www/public
env_file:
- .env
ports:
- ${NGINX_BIND_PORT}:80
expose:
- 8090
- 80
networks:
- default
depends_on:
- app
- rendertron
- varnish
rendertron:
image: scandipwa/rendertron
build:
context: build/rendertron
restart: on-failure:10
expose:
- 8083
networks:
- default
mysql:
image: mysql:${MYSQL_VERSION}
restart: on-failure:5
command:
- mysqld
- --explicit_defaults_for_timestamp=on
env_file:
- .env
- .application
volumes:
- mysql-data:/var/lib/mysql
ports:
- ${MYSQL_PORT}:3306
expose:
- 3306
networks:
- default
redis:
image: redis:${REDIS_VERSION}
restart: on-failure:5
env_file: .env
volumes:
- redis-data:/data
# Removed due bug-report: https://github.com/docker-library/redis/issues/235
# ports:
# - ${REDIS_PORT}:6379
expose:
- 6379
networks:
- default
maildev:
image: djfarrelly/maildev
ports:
- ${MAILDEV_PORT}:80
expose:
- 25
command: bin/maildev --web 80 --smtp 25 --base-pathname /maildev/
networks:
- default
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
restart: on-failure:5
env_file: .env
environment:
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- ${ELASTICSEARCH_PORT}:9200
networks:
- default
volumes:
app-data:
media-data:
mysql-data:
redis-data:
elasticsearch-data:
nginx-data:
networks:
default:
driver: bridge