Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
182 lines (170 loc) · 3.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
182 lines (170 loc) · 3.83 KB
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
version: '3.8'
services:
rabbitmq:
image: rabbitmq:3.12-management-alpine
container_name: ec_rabbitmq
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
networks:
- ec_network
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
interval: 5s
timeout: 3s
retries: 5
mongodb:
image: mongo:6.0
container_name: ec_mongodb
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
networks:
- ec_network
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 3s
retries: 5
mysql:
image: mysql:8.0
container_name: ec_mysql
restart: always
environment:
MYSQL_DATABASE: app
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- ec_network
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-proot" ]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:7-alpine
container_name: ec_redis
ports:
- "6379:6379"
networks:
- ec_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
mailhog:
image: mailhog/mailhog:latest
container_name: ec_mailhog
ports:
- "1025:1025" # SMTP port
- "8025:8025" # Web UI port
networks:
- ec_network
php-app:
build:
context: ./docker/php
dockerfile: Dockerfile
container_name: ec_php_app
volumes:
- ./app:/app
working_dir: /app
depends_on:
rabbitmq:
condition: service_healthy
mysql:
condition: service_healthy
mongodb:
condition: service_healthy
redis:
condition: service_healthy
networks:
- ec_network
command: tail -f /dev/null
go-worker:
build:
context: ./docker/go
dockerfile: Dockerfile
container_name: ec_go_worker
volumes:
- ./src-go:/app
depends_on:
rabbitmq:
condition: service_healthy
mongodb:
condition: service_healthy
networks:
- ec_network
command: tail -f /dev/null
python-bench:
build:
context: ./docker/python
dockerfile: Dockerfile
container_name: ec_python_bench
volumes:
- ./src-python:/app
depends_on:
rabbitmq:
condition: service_healthy
mongodb:
condition: service_healthy
networks:
- ec_network
command: tail -f /dev/null
worker-php-fiber:
build:
context: .
dockerfile: docker/php-fiber/Dockerfile
container_name: ec_php_bench
volumes:
- ./src-php:/app
environment:
- RABBIT_URL=amqp://guest:guest@rabbitmq:5672/
- MYSQL_HOST=mysql
- MONGO_URI=mongodb://mongodb:27017
- MAILHOG_HOST=mailhog
depends_on:
rabbitmq:
condition: service_healthy
mysql:
condition: service_healthy
mongodb:
condition: service_healthy
networks:
- ec_network
command: sleep infinity
worker-dotnet:
build:
context: .
dockerfile: docker/dotnet/Dockerfile
container_name: ec_dotnet_bench
volumes:
- ./src-dotnet:/app
environment:
- RABBIT_URL=amqp://guest:guest@rabbitmq:5672/
- MYSQL_HOST=mysql
- MONGO_URI=mongodb://mongodb:27017
- MAILHOG_HOST=mailhog
depends_on:
rabbitmq:
condition: service_healthy
mysql:
condition: service_healthy
mongodb:
condition: service_healthy
networks:
- ec_network
command: tail -f /dev/null
volumes:
mongo_data:
mysql_data:
networks:
ec_network:
driver: bridge