-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
233 lines (222 loc) · 5.06 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
version: '3.7'
services:
loadbalance:
image: nginx:1.13.1
restart: always
container_name: laravel-loadbalance-stage
depends_on:
- laravel
- socketio
expose:
- 80
- 443
ports:
- 2390:80
volumes:
- ./app:/app
- ./nginx:/etc/nginx/conf.d
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST
- VIRTUAL_PORT
- LETSENCRYPT_HOST
- LETSENCRYPT_EMAIL
networks:
proxy:
default:
aliases:
- laravelnginx
laravel:
image: maximmonin/laravel
container_name: laravel-stage
restart: always
depends_on:
- mysql
- redis
- socketio
entrypoint:
- bash
- -c
- |
set -e
echo 'Setting up container'
/scripts/beforebuild.sh
/scripts/build.sh
echo 'Starting gitlab-runner'
gitlab-runner start
echo 'Starting php-fpm'
exec php-fpm
extra_hosts:
- "git.private.site:10.21.10.13"
networks:
default:
aliases:
- laravel
volumes:
- ./app/storage:/app/storage
- ./app/public:/app/public
- ./mail:/etc/ssmtp
- ./worker/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./runner/conf:/etc/gitlab-runner
- ./runner/data:/home/gitlab-runner
- ./runner/scripts:/scripts
- ./git:/git
- /etc/localtime:/etc/localtime:ro
expose:
- 9000
laravel_worker:
image: maximmonin/laravel
container_name: laravel-worker-stage
restart: always
depends_on:
- mysql
- redis
- socketio
- laravel
entrypoint:
- bash
- -c
- |
set -e
echo 'Setting up container'
/scripts/build.sh
echo 'Starting queue workers and scheduler'
/start.sh
echo 'Starting php-fpm'
exec php-fpm
networks:
default:
aliases:
- laravel_worker
volumes:
- ./app/storage:/app/storage
- ./app/public:/app/public
- ./mail:/etc/ssmtp
- ./worker/laravel-worker.conf:/etc/supervisor/conf.d/laravel-worker.conf:ro
- ./worker/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./runner/scripts:/scripts
- ./git:/git
- /etc/localtime:/etc/localtime:ro
expose:
- 9000
mysql:
image: mariadb:10.4.11
restart: always
command: --default-authentication-plugin=mysql_native_password --init-file /init/init.sql
container_name: laravel-mysql-stage
networks:
default:
aliases:
- mysql
volumes:
- ./db:/var/lib/mysql
- ./init.sql:/init/init.sql
- /etc/localtime:/etc/localtime:ro
environment:
MYSQL_ROOT_PASSWORD: root
redis:
image: redis:5.0.7
container_name: laravel-redis-stage
restart: always
networks:
default:
aliases:
- redis
volumes:
- ./redis:/data
- /etc/localtime:/etc/localtime:ro
socketio:
image: mintopia/laravel-echo-server
restart: always
container_name: laravel-socketio-stage
depends_on:
- redis
networks:
default:
aliases:
- socketio
volumes:
- /etc/localtime:/etc/localtime:ro
expose:
- 6001
environment:
- LARAVEL_ECHO_SERVER_AUTH_HOST=http://laravelnginx
- LARAVEL_ECHO_SERVER_DEBUG=true
- ECHO_DEVMODE=true
- ECHO_PROTOCOL=http
- ECHO_REDIS_PORT=6379
- ECHO_REDIS_HOSTNAME=redis
- ECHO_ALLOW_CORS
- ECHO_ALLOW_ORIGIN
selenium:
image: selenium/hub
restart: always
container_name: laravel-selenium-stage
depends_on:
- loadbalance
volumes:
- /dev/shm:/dev/shm
- /etc/localtime:/etc/localtime:ro
environment:
- GRID_MAX_SESSION=5
- GRID_BROWSER_TIMEOUT=30000
networks:
default:
aliases:
- selenium
selenium-chrome:
image: selenium/node-chrome
restart: always
container_name: laravel-selenium-chrome-stage
depends_on:
- selenium
environment:
- HUB_HOST=selenium
- HUB_PORT=4444
- NODE_MAX_SESSION=5
- NODE_MAX_INSTANCES=5
volumes:
- /etc/localtime:/etc/localtime:ro
networks:
default:
selenium-firefox:
image: selenium/node-firefox
restart: always
container_name: laravel-selenium-firefox-stage
depends_on:
- selenium
environment:
- HUB_HOST=selenium
- HUB_PORT=4444
- NODE_MAX_SESSION=5
- NODE_MAX_INSTANCES=5
volumes:
- /etc/localtime:/etc/localtime:ro
networks:
default:
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: laravel-phpadmin-stage
restart: always
depends_on:
- mysql
ports:
- 2391:80
networks:
default:
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
MYSQL_USERNAME: root
MYSQL_ROOT_PASSWORD: root
PMA_HOST: mysql
networks:
default:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
proxy:
external:
name: nginx-proxy