-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.override.yaml
141 lines (129 loc) · 3.33 KB
/
docker-compose.override.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: '3.4'
x-build:
- &build-args
YII_ENV: 'dev'
YII_DEBUG: 'true'
- &build-cache
- ${PHP_IMAGE:-vuongxuongminh/docker-helm-yii-php}:dev
- ${NGINX_IMAGE:-vuongxuongminh/docker-helm-yii-nginx}:dev
services:
mysql:
image: mysql:8
command: ['--default-authentication-plugin=mysql_native_password']
environment:
MYSQL_DATABASE: 'test'
MYSQL_ROOT_PASSWORD: 'root'
volumes:
- db-data:/var/lib/mysql
ports:
- target: 3306
published: 3306
protocol: tcp
setup:
image: ${PHP_IMAGE:-vuongxuongminh/docker-helm-yii-php}:dev
command: ['setup']
build:
context: .
dockerfile: ./docker/Dockerfile
target: php
cache_from: *build-cache
args:
<< : *build-args
environment:
<< : *build-args
volumes:
- ./yii:/yii:rw
depends_on:
- mysql
fpm:
image: ${PHP_IMAGE:-vuongxuongminh/docker-helm-yii-php}:dev
build:
cache_from: *build-cache
args:
<< : *build-args
environment:
<< : *build-args
volumes:
- ./yii:/yii:rw,cached
- fpm-log-data:/yii/runtime/logs:rw
depends_on:
- mysql
supervisor:
image: ${PHP_IMAGE:-vuongxuongminh/docker-helm-yii-php}:dev
build:
cache_from: *build-cache
args:
<< : *build-args
environment:
<< : *build-args
SUPERVISOR_USERNAME: root
SUPERVISOR_PASSWORD: root
volumes:
- ./yii:/yii:rw,cached
- supervisor-log-data:/yii/runtime/logs:rw
ports:
- target: 9000
published: 9000
protocol: tcp
depends_on:
- mysql
nginx:
image: ${NGINX_IMAGE:-vuongxuongminh/docker-helm-yii-nginx}:dev
build:
cache_from: *build-cache
args:
<< : *build-args
environment:
# `fpm` container name use to pass request via `fastcgi_pass`, it useful when you want to change `fpm` service name or container name of it.
FPM_SERVICE: fpm
volumes:
- ./yii/web:/yii/web:rw,cached
- nginx-log-data:/var/log/nginx:rw
ports:
- target: 80
published: 80
protocol: tcp
mailhog:
image: mailhog/mailhog
ports:
- target: 8025
published: 8025
protocol: tcp
rabbitmq:
image: rabbitmq:3.8-management-alpine
ports:
- target: 15672
published: 15672
protocol: tcp
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
environment:
discovery.type: "single-node"
kibana:
image: docker.elastic.co/kibana/kibana:7.6.0
depends_on:
- elasticsearch
environment:
SERVER_NAME: localhost
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ports:
- target: 5601
published: 5601
protocol: tcp
filebeat:
image: docker.elastic.co/beats/filebeat:7.6.0
command: "filebeat -e -strict.perms=false"
depends_on:
- elasticsearch
- kibana
volumes:
- ./docker/dev-filebeat/modules.d:/usr/share/filebeat/modules.d:ro
- ./docker/dev-filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- fpm-log-data:/usr/share/filebeat/logs/fpm:ro
- supervisor-log-data:/usr/share/filebeat/logs/supervisor:ro
- nginx-log-data:/usr/share/filebeat/logs/nginx:ro
volumes:
db-data: {}
fpm-log-data: {}
nginx-log-data: {}
supervisor-log-data: {}