forked from meanbee/docker-magento2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
126 lines (119 loc) · 2.66 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: "2"
services:
varnish:
build:
context: varnish/
environment:
- VIRTUAL_HOST=magento2.docker
- VIRTUAL_PORT=80
- HTTPS_METHOD=noredirect
ports:
- "80"
links:
- web
volumes:
- ./logs/varnish/:/var/log
web:
build:
context: nginx/
ports:
- "80"
- "443"
links:
- fpm
- db
volumes:
- ./logs/web/:/var/log/nginx
# command: [nginx-debug, '-g', 'daemon off;']
volumes_from:
- appdata
env_file:
- ./global.env
# environment:
# - VIRTUAL_HOST=magento2.docker
# - VIRTUAL_PORT=80
# - HTTPS_METHOD=noredirect
fpm:
hostname: fpm.magento2.docker
build:
context: php/${PHP_VERSION}-fpm/
image: ${COMPOSE_PROJECT_NAME}_fpm:${PHP_VERSION}
ports:
- "9000"
links:
- db
volumes:
- ./logs/fpm/:/var/log
volumes_from:
- appdata
env_file:
- ./global.env
db:
image: mariadb:10
ports:
- "3306"
volumes:
- ./logs/db/:/var/log
volumes_from:
- dbdata
environment:
- MYSQL_ROOT_PASSWORD=magento2
- MYSQL_DATABASE=magento2
- MYSQL_USER=magento2
- MYSQL_PASSWORD=magento2
- TERM=meh
cli:
hostname: cli.magento2.docker
build:
context: php/${PHP_VERSION}-cli/
image: ${COMPOSE_PROJECT_NAME}_cli:${PHP_VERSION}
links:
- db
volumes:
- ~/.composer/cache:/root/.composer/cache
- ./logs/cli/:/var/log
volumes_from:
- appdata
env_file:
- ./global.env
- ./composer.env
environment:
- M2SETUP_INSTALL_DB=true
- M2SETUP_DB_HOST=db
- M2SETUP_DB_NAME=magento2
- M2SETUP_DB_USER=magento2
- M2SETUP_DB_PASSWORD=magento2
- M2SETUP_BASE_URL=http://magento2.docker/
- M2SETUP_SECURE_BASE_URL=https://magento2.docker/
- M2SETUP_BACKEND_FRONTNAME=admin
- M2SETUP_ADMIN_FIRSTNAME=Admin
- M2SETUP_ADMIN_LASTNAME=User
- M2SETUP_ADMIN_USER=admin
- M2SETUP_ADMIN_PASSWORD=password1
- M2SETUP_VERSION=${MAGENTO_VERSION}
- M2SETUP_USE_SAMPLE_DATA=true
cron:
build:
context: php/${PHP_VERSION}-cli/
image: ${COMPOSE_PROJECT_NAME}_cron:${PHP_VERSION}
hostname: magento2-cron.docker
command: run-cron
env_file:
- ./global.env
environment:
- ENABLE_SENDMAIL=true
volumes:
- ./logs/cron/:/var/log
volumes_from:
- appdata
links:
- db
appdata:
image: tianon/true
volumes:
- ./magento:/var/www/magento
dbdata:
image: tianon/true
volumes:
- /var/lib/mysql