-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose-build.yml
178 lines (164 loc) · 4 KB
/
docker-compose-build.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
version: "2"
volumes:
db:
elasticdata:
redis-data:
services:
php:
image: trydirect/symfony:4.2.3
build: ./dockerfiles/php
restart: always
container_name: php
env_file:
- .env
links:
- db
working_dir: /var/www/html
environment:
XDEBUG_CONFIG: remote_host=0.0.0.0
volumes:
- ./symfony:/var/www/html
- ./configs/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./configs/php/xdebug.ini:/usr/local/lib/php/doc/xdebug/xdebug.ini
# logging:
# driver: "json-file"
# options:
# max-size: "10m"
# tag: "php"
elasticsearch:
image: elasticsearch:5.4.3
restart: always
container_name: elasticsearch
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
links:
- php
depends_on:
- php
volumes:
- elasticdata:/usr/share/elasticsearch/data
- ./configs/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- "127.0.0.1:9200:9200"
- "127.0.0.1:9300:9300"
kibana:
image: kibana:5.4.3
restart: always
container_name: kibana
depends_on:
- elasticsearch
ports:
- "5601:5601"
links:
- elasticsearch
env_file:
- .env
volumes:
- ./configs/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
logstash:
image: optimum/logstash-symfony-5.4.0
#build: configs/logstash/
environment:
LS_JAVA_OPTS: "-Xms1g -Xmx4g"
container_name: logstash
restart: always
ports:
- "5044:5044"
links:
- elasticsearch
depends_on:
- elasticsearch
filebeat:
image: docker.elastic.co/beats/filebeat:6.7.1
restart: always
container_name: filebeat
user: 0:0
env_file:
- .env
volumes:
- ./configs/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml
- /var/lib/docker/containers:/var/lib/docker/containers
- /var/run/docker.sock:/var/run/docker.sock
links:
- logstash
redis:
image: redis:latest
restart: always
container_name: redis
env_file:
- .env
volumes:
- redis-data:/data
# logging:
# driver: "json-file"
# options:
# max-size: "10m"
# tag: "redis"
db:
image: postgres:9.4
container_name: db
restart: always
ports:
#- "5432:5432" - publish port to the world.
- "5432"
env_file:
- .env
volumes:
- db:/var/lib/postgresql/data/pgdata
- ./scripts/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh
# logging:
# driver: "json-file"
# options:
# max-size: "10m"
# tag: "db"
# entry point
nginx:
image: trydirect/nginx:latest
container_name: nginx
restart: always
depends_on:
- php
ports:
- "80:80"
- "443:443"
links:
- php
- kibana
volumes:
- ./configs/certs/ssl:/etc/nginx/ssl
- ./configs/certs/letsencrypt:/etc/letsencrypt
- ./configs/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./configs/nginx/conf.d:/etc/nginx/conf.d
- ./configs/supervisord:/etc/supervisor/conf.d/
- ./configs/cron/nginx:/var/spool/cron/crontabs
- ./symfony:/var/www/html
entrypoint: /usr/bin/supervisord -c /etc/supervisor/supervisord.conf -n
# logging:
# driver: "json-file"
# options:
# max-size: "10m"
# gelf-tag: "container_{{.Name}}"
# basic data bus for interaction between servers
mq:
container_name: mq
image: rabbitmq:3-management
restart: always
env_file:
- .env
ports:
# note! from others containers need connect to 5672 port, not 2172
# 2172 using for debug
- "2172:5672"
- "5672"
- "21072:15672"
# logging:
# driver: "json-file"
# options:
# max-size: "10m"
# tag: "rabbitm"