-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-build.yml
131 lines (120 loc) · 2.92 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
version: "2"
volumes:
db:
elasticdata:
redis-data:
services:
php:
image: trydirect/symfony4-restful:4.4.8
build: dockerfiles/build
restart: always
container_name: php
links:
- db
working_dir: /var/www/html
env_file:
- .env
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
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
db:
image: mysql:5.7
restart: always
container_name: db
env_file:
- .env
volumes:
- db:/var/lib/mysql
# entry point
nginx:
image: ${REGISTRY}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