-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
166 lines (155 loc) · 4.65 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
159
160
161
162
163
164
165
166
version: '2'
services:
apache:
image: "symbiote/apache2:latest"
depends_on:
- mysql
ports:
- "80:80"
- "443:443"
links:
- php:php
working_dir: /var/www/html
volumes:
- .:/var/www/html
- ${DOCKER_PROJECT_PATH}/logs:/var/log/apache2
php:
image: "symbiote/php-fpm:${DOCKER_PHP_VERSION}"
links:
- mysql:mysql
volumes:
- '.:/var/www/html'
- ${DOCKER_PROJECT_PATH}/logs:/var/log/php
- ${DOCKER_PROJECT_PATH}/logs:/var/log/silverstripe
# Enable xdebug via the env var DOCKER_PHP_COMMAND.
# Note: there needs to be an '&&' at the end.
command: bash -c "${DOCKER_PHP_COMMAND} php-fpm"
node:
image: "symbiote/node:${DOCKER_NODE_VERSION}"
tty: true
working_dir: /tmp
volumes:
- '.:/tmp'
command: ["/bin/bash"]
# Uses the same image as php, but executes as a separate container
# to enable tty, and allow for SSH access which we will keep separate
# from the web container. Will revisit this at some point as it's
# more efficient to use the same container for both
phpcli:
image: "symbiote/php-cli:${DOCKER_PHP_VERSION}"
links:
- mysql:mysql
tty: true
working_dir: /var/www/html
environment:
SSH_AUTH_SOCK: "/tmp/ssh_agent_socket"
GIT_COMMIT: ${CI_COMMIT_SHA}
GIT_BRANCH: ${CI_COMMIT_REF_SLUG}
COMPOSER_PROCESS_TIMEOUT: ${DOCKER_COMPOSER_TIMEOUT}
volumes:
- '.:/var/www/html'
- ${DOCKER_SHARED_PATH}/composer-cache:/usr/local/composer/cache
- ${DOCKER_PROJECT_PATH}/logs:/var/log/php
- ${DOCKER_PROJECT_PATH}/logs:/var/log/silverstripe
- $SSH_AUTH_SOCK:/tmp/ssh_agent_socket
- ${DOCKER_SSH_VOLUME}
command: ["/bin/bash"]
sqsrunner:
image: "symbiote/php-cli:${DOCKER_PHP_VERSION}"
links:
- mysql:mysql
tty: false
working_dir: /var/www/html
volumes:
- '.:/var/www/html'
- ${DOCKER_PROJECT_PATH}/logs:/var/log/php
- ${DOCKER_PROJECT_PATH}/logs:/var/log/silverstripe
command: [
"php",
"sqs-jobqueue/central-runner.php",
]
queuedjobs:
image: "symbiote/php-cli:${DOCKER_PHP_VERSION}"
links:
- mysql:mysql
tty: false
working_dir: /var/www/html
volumes:
- '.:/var/www/html'
- ${DOCKER_PROJECT_PATH}/logs:/var/log/php
- ${DOCKER_PROJECT_PATH}/logs:/var/log/silverstripe
command: [
"/bin/bash",
"-c",
"while :; do php /var/www/html/${DOCKER_CLISCRIPT_PATH} dev/tasks/ProcessJobQueueTask queue=2 >> /var/log/php/queuedjob.log; php /var/www/html/${DOCKER_CLISCRIPT_PATH} dev/tasks/ProcessJobQueueTask queue=3 >> /var/log/php/queuedjob.log; sleep 30; done"
]
adminer:
image: "adminer:4.6-standalone"
environment:
ADMINER_DESIGN: nette
ADMINER_DEFAULT_SERVER: mysql
depends_on:
- mysql
links:
- mysql:mysql
ports:
- "8080:8080"
mysql:
image: "mysql:${DOCKER_MYSQL_VERSION}"
ports:
- "3306:3306"
volumes:
- "${DOCKER_PROJECT_PATH}/mysql-data:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: "password"
MYSQL_ROOT_HOST: "%"
# Fixes MySQL has gone away issues with small default packet size, also fixes BLOB/TEXT exceeding 10% of log size issue
command: mysqld --max_allowed_packet=64M --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-log-file-size=64M
redis:
image: "redis:3.2-alpine"
ports:
- "6379:6379"
volumes:
- ${DOCKER_PROJECT_PATH}/redis-data:/data
elastic:
image: "docker.elastic.co/elasticsearch/elasticsearch:5.3.3"
ports:
- "9200:9200"
environment:
- "http.host=0.0.0.0"
- "transport.host=127.0.0.1"
- "xpack.security.enabled=false"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- ${DOCKER_PROJECT_PATH}/elastic-data:/usr/share/elasticsearch/data
# NOTE: This expects the solr module to have been downloaded _first_
# before you run this container! Otherwise you _will_ get permission
# issues
solr:
image: solr:5.5
ports:
- "8983:8983"
volumes:
- ${DOCKER_PROJECT_PATH}/solr-logs:/opt/solr/server/logs
- ${DOCKER_PROJECT_PATH}/solr-data:/opt/solr/server/solr/mycores/
- ./solr/docker-configs/conf-5.5:/myconfig
entrypoint:
- docker-entrypoint.sh
- solr-precreate
- project
- /myconfig
selenium:
image: symbiote/selenium-chrome:2.53.1
depends_on:
- apache
environment:
WEB_NAME: apache
ports:
- "4444:4444"
volumes:
- /dev/shm:/dev/shm
mailhog:
image: "mailhog/mailhog:v1.0.0"
ports:
- "1025:1025"
- "8025:8025"