-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
102 lines (87 loc) · 2.48 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
version: '2'
services:
### Workspace Utilities Container ###########################
workspace:
build:
context: ./workspace
args:
- CRON=false
- INSTALL_XDEBUG=false
- INSTALL_NODE=false
- COMPOSER_GLOBAL_INSTALL=false
- PUID=1000
- PGID=1000
- MAGENTO_ROOT
volumes_from:
- volumes_source
volumes:
- ./logs/magento/:${MAGENTO_ROOT}/var/log
- ./data/backups/:${MAGENTO_ROOT}/var/backups
- ${SSH_AUTH_SOCK}:/ssh-agent # Forward local machine SSH key to docker
tty: true
env_file:
- ./global.env
- ./local.env
environment:
SSH_AUTH_SOCK: /ssh-agent
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_XDEBUG=false
- MAGENTO_ROOT
volumes_from:
- volumes_source
links:
- workspace
env_file:
- ./global.env
- ./local.env
### Nginx Server Container ##################################
nginx:
build:
context: ./nginx
args:
- PHP_UPSTREAM=php-fpm
- PUID=1000
- PGID=1000
- MAGENTO_ROOT
volumes_from:
- volumes_source
volumes:
- ./logs/nginx/:/var/log/nginx
ports:
- "80:80"
- "443:443"
links:
- php-fpm
env_file:
- ./global.env
- ./local.env
### MySQL Container #########################################
mysql:
build: ./mysql
volumes_from:
- volumes_data
ports:
- "3306:3306"
env_file:
- ./global.env
- ./local.env
### Redis Container #########################################
redis:
image: redis:3.2-alpine
volumes_from:
- volumes_data
### Magento2 Application Code Container ######################
volumes_source:
image: tianon/true
volumes:
- "${MAGENTO_HOST_SOURCE}/:${MAGENTO_ROOT}"
### Databases Data Container ################################
volumes_data:
image: tianon/true
volumes:
- ./data/mysql:/var/lib/mysql
- ./data/redis:/data