forked from alankent/magento2devbox-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
158 lines (130 loc) · 5.57 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
##
# Services needed to run Magento2 application on Docker
#
# Docker Compose defines required services and attach them together through aliases
##
version: '2'
services:
web:
restart: always
image: alankent/magento2devbox-web:latest
depends_on:
- db
#- rabbitmq
#- elastic
#- rabbitmq
volumes:
# Uncomment the first line for use with Unison and the "unison"
# service below (Mac, Windows). Uncomment the second line instead
# to mount the volume directly (Linux). Comment out both lines if
# file sharing is not required.
- "/var/www"
#- "./shared/www:/var/www"
# Uncomment to share your ~/.ssh directory with the container.
# This can be useful for GitHub ssh keys and similar.
#- "~/.ssh:/home/magento2/.ssh"
# Uncomment this line if you want to share your composer
# download cache between projects (more efficient, but
# means the auth.json file will also be shared).
#- "~/.composer:/home/magento2/.composer"
# Uncomment to mount local directory for apache log files.
#- "./shared/logs/apache2:/var/log/apache2"
# Uncomment to mount local directory for FPM log files.
#- "./shared/logs/php-fpm:/var/log/php-fpm"
# Uncomment to share Magento cloud CLI settings between projects.
#- "./shared/.magento-cloud:/home/magento2/.magento-cloud"
environment:
# Optional. If set, container will create a default auth.json
# file for Composer to use (if one does not already exist).
# (Download keys are a long hex sequence available from
# http://marketplace.magento.com/, "My Profile", "My Access Keys")
# Generally it is not recommended to commit keys to a git repo
# for security reasons - it grants all viewers permission to download
# all your Marketplace purchases.
- MAGENTO_PUBLIC_KEY=
- MAGENTO_PRIVATE_KEY=
# The following exposes ports inside the container publicly.
# Docker maps the public port numbers to ports inside the container
# using Linux iptables support. If a single number is specified,
# Docker will pick an unused port number at random every time the
# container restarts. Use 8080:80 to bind the public port number
# of 8080 to the internal port number of 80. (The internal port
# number never changes - you may pick any external port number
# to avoid collisions between different containers or projects.)
ports:
# Pick a random unused web server port.
# (Use "8080:80" for force external port to be 8080.)
- "80"
# Use port 2222 for SSH (make sure unique across projects).
# (If using the PHP Storm IDE, It is strongly recommended to pick a
# dedicated port using the "2222:22" syntax so the port number does
# not change each time the container is restarted, requiring PHP
# Storm reconfiguration.)
- "2222:22"
# Expose the BrowserSync ports.
# (Only needed if using BrowserSync for frontend development.)
- "3000"
- "3001"
# This container contains the Unison process.
# Comment out / remove this service if not using Unison (e.g. on Linux).
unison:
restart: always
image: alankent/magento2devbox-unison:latest
depends_on:
- "web"
# Mount the /var/www directory from the "web" container.
volumes_from:
- "web"
ports:
# Pick a random unused unison "socket" port.
# This can be commented out if "ssh" access is used instead.
- "5000"
# Pick a random port for ssh based Unison connections (developers
# normally do not log in to this container).
# Use "2223:22" to lock the port number across container restarts.
- "22"
db:
restart: always
image: mysql:5.6
ports:
- "3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=magento2
# Uncomment the following line if you uncomment a volume mount
#volumes:
# Uncomment to mount log files locally.
#- "./shared/logs/mysql:/var/log/mysql"
# Uncomment if you want the database to last after removing the
# container. (Not recommended.)
#- "./shared/db:/var/lib/mysql"
# Uncomment the following to enable Varnish support.
# (Make sure the service name indentation remains exactly aligned with
# the previous service names)
#varnish:
# restart: always
# depends_on:
# - "web"
# image: magento/magento2devbox-varnish:latest
# ports:
# - 6081
# Uncomment the following lines to enable Redis support.
# (Make sure the service name indentation remains exactly aligned with
# the previous service names)
#redis:
# restart: always
# image: redis:3.0.7
# Uncomment the following to enable ElasticSearch support.
# (Make sure the service name indentation remains exactly aligned with
# the previous service names)
#elastic:
# restart: always
# image: elasticsearch:2
# ports:
# - 9200
# Uncomment the following to enable RabbitMQ support.
# (Make sure the service name indentation remains exactly aligned with
# the previous service names)
#rabbitmq:
# restart: always
# image: rabbitmq:latest