-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
executable file
·120 lines (112 loc) · 3.19 KB
/
docker-compose.yaml
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
version: '3.3'
volumes:
database_data:
driver: local
database_data_new:
driver: local
rabbitmqetc:
driver: local
rabbitmqdata:
driver: local
rabbitmqlogs:
driver: local
networks:
default:
external:
name: backend
backend:
driver: bridge
frontend:
driver: bridge
services:
mailhog:
image: mailhog/mailhog:v1.0.1
ports:
- "1025:1025"
- "8025:8025"
networks:
- backend
db:
platform: linux/amd64
image: mysql:8.0
ports:
- "3307:3306"
volumes:
- database_data_new:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: docker
restart: on-failure
networks:
- backend
rabbitmq:
image: rabbitmq:3.9-management-alpine
environment:
RABBITMQ_ERLANG_COOKIE: rabbitmqcookie
RABBITMQ_DEFAULT_USER: rabbit
RABBITMQ_DEFAULT_PASS: docker
volumes:
- rabbitmqetc:/etc/rabbitmq/
- rabbitmqdata:/var/lib/rabbitmq/
- rabbitmqlogs:/var/log/rabbitmq/
networks:
- backend
restart: on-failure
ports:
- "5672:5672"
- "15672:15672"
php:
image: ghcr.io/debricked/docker-image-php-xdebug:latest
environment:
# Reference https://gist.github.com/jehaby/61a89b15571b4bceee2417106e80240d
PHP_IDE_CONFIG: "serverName=docker.php.cli"
BLACKFIRE_SERVER_ID: ${BLACKFIRE_SERVER_ID}
BLACKFIRE_SERVER_TOKEN: ${BLACKFIRE_SERVER_TOKEN}
BLACKFIRE_CLIENT_ID: ${BLACKFIRE_CLIENT_ID}
BLACKFIRE_CLIENT_TOKEN: ${BLACKFIRE_CLIENT_TOKEN}
BLACKFIRE_SOCKET: tcp://webserver:8707
REDIS_HOST: redis
REDIS_PORT: 6379
IN_DOCKER: "true"
expose:
- 9000
- 9001
ports:
- "8000:8000"
volumes:
- ./:/var/www/html
depends_on:
- db
- rabbitmq
- mailhog
entrypoint:
- /bin/sh
- -c
- ip -4 route list match 0/0 | awk '{print $$3" host.docker.internal"}' >> /etc/hosts && php-fpm --allow-to-run-as-root
restart: on-failure
tty: true
user: root
shm_size: 2g
networks:
- backend
nginx:
image: nginx:latest
environment:
# Exposes the host Blackfire IDs and tokens environment variables.
BLACKFIRE_SERVER_ID: ${BLACKFIRE_SERVER_ID}
BLACKFIRE_SERVER_TOKEN: ${BLACKFIRE_SERVER_TOKEN}
BLACKFIRE_CLIENT_ID: ${BLACKFIRE_CLIENT_ID}
BLACKFIRE_CLIENT_TOKEN: ${BLACKFIRE_CLIENT_TOKEN}
BLACKFIRE_SOCKET: tcp://webserver:8707
ports:
- "8888:80"
- "8707:8707"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./:/var/www/html
depends_on:
- php
restart: on-failure
user: root
networks:
- backend
- frontend