forked from kaliop/ezdocker-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev-template.yml
194 lines (184 loc) · 7.29 KB
/
docker-compose-dev-template.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
### Notes
#
# - using the 'build' config instead of 'image' allows to build the platform with just 'docker-compose build'
# - SYS_PTRACE capability is needed to allow tghe containers to read /proc/$PID, which is needed by init scripts
#
# The docker-compose 'service' name corresponds to the top-level yml keys, whereas the container name is used in most
# 'docker' commands.
# Keeping a separate container name for each project allows to run many container platforms in parallel
version: '2'
services:
web:
image: styleflasher/apache_${DOCKER_PHP_VERSION}
hostname: ${DOCKER_PROJECT_NAME}_web
container_name: web
ports:
- "82:82"
- "88:88"
volumes:
- ./config/apache/sites-available/001-dynamic-vhost-ez5.conf:/etc/apache2/sites-available/001-dynamic-vhost-ez5.conf
- ./config/apache/sites-available/002-dynamic-vhost-ezplatform.conf:/etc/apache2/sites-available/002-dynamic-vhost-ezplatform.conf
- ./config/apache/sites-available/003-dynamic-vhost-ez4.conf:/etc/apache2/sites-available/003-dynamic-vhost-ez4.conf
- ./config/apache/sites-available/004-custom-vhosts.conf:/etc/apache2/sites-available/004-custom-vhosts.conf
- ./config/apache/sites-available/005-sylius-vhost.conf:/etc/apache2/sites-available/005-sylius-vhost.conf
- ./config/apache/sites-available/006-ezplatform3-vhost.conf:/etc/apache2/sites-available/006-ezplatform3-vhost.conf
- ./config/apache/sites-available/ez4-common.conf:/etc/apache2/sites-available/ez4-common.conf
- ./config/apache/sites-available/ez5-common.conf:/etc/apache2/sites-available/ez5-common.conf
- ./config/apache/sites-available/ezplatform-common.conf:/etc/apache2/sites-available/ezplatform-common.conf
- ./logs/apache/:/var/log/apache2
- "./config/apache/php5/custom_vars.ini:$DOCKER_PHP_CONF_PATH/apache2/conf.d/custom_vars.ini"
- "./config/apache/php5/timezone.ini:$DOCKER_PHP_CONF_PATH/apache2/conf.d/timezone.ini"
- "$DOCKER_WWW_ROOT:$DOCKER_WWW_DEST"
- "$DOCKER_STORAGE_LOCAL_PATH:$DOCKER_STORAGE_MOUNT_POINT"
- ./config/apache/certs/apache.crt:/etc/ssl/certs/apache.crt
- ./config/apache/certs/apache.key:/etc/ssl/certs/apache.key
- ./config/apache/ssmtp/ssmtp.conf:/etc/ssmtp/ssmtp.conf
- ./history/apache/.bash_history_site:/home/site/.bash_history
- ./history/apache/.bash_history_root:/root/.bash_history
- ./config/imagemagick/policy.xml:/etc/ImageMagick-6/policy.xml
env_file:
- docker-compose.env
- docker-compose.env.local
cap_add:
- SYS_PTRACE
cli:
image: styleflasher/cli_${DOCKER_PHP_VERSION}
hostname: ${DOCKER_PROJECT_NAME}_cli
container_name: cli
privileged: true
volumes:
- ./logs/cli:/var/log/php
# files in /tmp/cron.d get managed by bootstrap.sh
- ./config/cli/cron.d:/tmp/cron.d
- ~/.gitconfig:/home/site/.gitconfig
- ~/.ssh:/home/site/.ssh
- "$SSH_AUTH_SOCK:/ssh-agent"
- "./config/cli/php5/custom_vars.ini:$DOCKER_PHP_CONF_PATH/cli/conf.d/custom_vars.ini"
- "./config/cli/php5/timezone.ini:$DOCKER_PHP_CONF_PATH/cli/conf.d/timezone.ini"
- "$DOCKER_WWW_ROOT:$DOCKER_WWW_DEST"
- "$DOCKER_STORAGE_LOCAL_PATH:$DOCKER_STORAGE_MOUNT_POINT"
- ./config/apache/ssmtp/ssmtp.conf:/etc/ssmtp/ssmtp.conf
- ./history/cli/.bash_history_site:/home/site/.bash_history
- ./history/cli/.bash_history_root:/root/.bash_history
- ./config/imagemagick/policy.xml:/etc/ImageMagick-6/policy.xml
environment:
- SSH_AUTH_SOCK=/ssh-agent
env_file:
- docker-compose.env
- docker-compose.env.local
cap_add:
- SYS_PTRACE
memcached:
image: klabs/memcached
hostname: ${DOCKER_PROJECT_NAME}_memcached
container_name: memcached
ports:
- "11211:11211"
volumes:
- ./logs/memcache/:/var/log/memcache
env_file:
- docker-compose.env
- docker-compose.env.local
cap_add:
- SYS_PTRACE
redis:
image: redis
hostname: ${DOCKER_PROJECT_NAME}_redis
container_name: redis
expose:
- 6379
solr:
image: styleflasher/solr6
hostname: ${DOCKER_PROJECT_NAME}_solr
container_name: solr
ports:
- "8983:8983"
volumes:
- "${DOCKER_SOLR_CONF_PATH}:/opt/solr/solr/"
- ./data/solr6/:/opt/solr/server/ez/
env_file:
- docker-compose.env
- docker-compose.env.local
cap_add:
- SYS_PTRACE
varnish:
image: klabs/varnish
hostname: ${DOCKER_PROJECT_NAME}_varnish
container_name: varnish
ports:
- "81:81"
volumes:
- "${DOCKER_VARNISH_VCL_FILE}:/etc/varnish/default.vcl"
- ./logs/varnish/:/var/log/varnish
env_file:
- docker-compose.env
- docker-compose.env.local
cap_add:
- SYS_PTRACE
# varnish init daemon wants to set ulimits
- SYS_RESOURCE
security_opt:
- apparmor:unconfined
depends_on:
- web
- cli
haproxy:
image: klabs/haproxy
hostname: ${DOCKER_PROJECT_NAME}_haproxy
container_name: haproxy
ports:
- "80:80"
- "443:443"
volumes:
- ./config/haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg
- ./config/haproxy/ssl/:/etc/ssl/private/
env_file:
- docker-compose.env
- docker-compose.env.local
depends_on:
- web
- varnish
- solr
mysql:
image: styleflasher/mysql
hostname: ${DOCKER_PROJECT_NAME}_mysql
container_name: mysql
# nb: this prevents the image to start on some ubuntu installs because of apparmor config...
#privileged: true
ports:
- "3307:3306"
volumes:
- ./config/mysql/:/etc/mysql/conf.d/
- ./data/mysql/:/var/lib/mysql
- ./logs/mysql/:/var/log/mysql
env_file:
- docker-compose.env
- docker-compose.env.local
cap_add:
- SYS_PTRACE
# official phpmyadmin image
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.1.3
hostname: ${DOCKER_PROJECT_NAME}_phpmyadmin
container_name: phpmyadmin
env_file:
- docker-compose.env
- docker-compose.env.local
depends_on:
- mysql
mailhog:
image: mailhog/mailhog
container_name: mailhog
env_file:
- docker-compose.env
- docker-compose.env.local
ports:
- "8025:8025"
gitlab-runner:
image: gitlab/gitlab-runner:v13.1.1
container_name: gitlab_runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config/gitlab-runner:/etc/gitlab-runner
- ~/.ssh/config:/root/.ssh/config
- ~/.ssh/known_hosts:/root/.ssh/known_hosts