forked from CodelyTV/php-ddd-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·104 lines (97 loc) · 2.87 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
version: '3'
services:
shared_rabbitmq:
container_name: codelytv-php_ddd_skeleton-rabbitmq
image: 'rabbitmq:3.7-management'
restart: unless-stopped
ports:
- 5630:5672
- 8090:15672
environment:
- RABBITMQ_DEFAULT_USER=codelytv
- RABBITMQ_DEFAULT_PASS=c0d3ly
shared_prometheus:
container_name: codelytv-php_ddd_skeleton-prometheus
image: prom/prometheus:v2.1.0
volumes:
- ./etc/prometheus/:/etc/prometheus/
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9999:9090
mooc_mysql:
container_name: codelytv-php_ddd_skeleton-mooc-mysql
image: mariadb:10.6
ports:
- 3360:3306
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: ["CMD", "mysqladmin", "--user=root", "--password=", "--host=127.0.0.1", "ping", "--silent"]
interval: 2s
timeout: 10s
retries: 10
command: ["--default-authentication-plugin=mysql_native_password"]
backoffice_elasticsearch:
container_name: codelytv-php_ddd_skeleton-backoffice-elastic
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.10
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
backoffice_backend_php:
container_name: codelytv-php_ddd_skeleton-backoffice_backend-php
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8040:8040"
- "9040:9001"
volumes:
- .:/app:delegated
depends_on:
- shared_rabbitmq
- shared_prometheus
- backoffice_elasticsearch
command: symfony serve --dir=apps/backoffice/backend/public --port=8040 --force-php-discovery
backoffice_frontend_php:
container_name: codelytv-php_ddd_skeleton-backoffice_frontend-php
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8041:8041"
- "9041:9001"
volumes:
- .:/app:delegated
depends_on:
- shared_rabbitmq
- shared_prometheus
- backoffice_elasticsearch
- mooc_mysql
command: symfony serve --dir=apps/backoffice/frontend/public --port=8041 --force-php-discovery
mooc_backend_php:
container_name: codelytv-php_ddd_skeleton-mooc_backend-php
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8030:8030"
- "9030:9001"
volumes:
- .:/app:delegated
depends_on:
- shared_rabbitmq
- shared_prometheus
- mooc_mysql
command: symfony serve --dir=apps/mooc/backend/public --port=8030 --force-php-discovery