-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·213 lines (198 loc) · 5.91 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
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
version: '3'
services:
php:
build:
context: ./sf-api
args:
PHP_VERSION: "7.4"
COMPOSER_VERSION: "1.10.13"
APCU_VERSION: "5.1.18"
XDEBUG_VERSION: "2.9.2"
container_name: php
depends_on:
- api-db
- blackfire
- elasticsearch
env_file:
- ./sf-api/.env
# Comment out these volumes in production
volumes:
- ./sf-api:/app/sf-api:rw,delegated
# If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
environment:
# If you develop on Windows change this to remote_host=docker.for.win.localhost
# If you develop on Linux change this to remote_host=172.17.0.1
XDEBUG_CONFIG: "remote_host=docker.for.mac.localhost idekey=IDE_XDEBUG"
PHP_IDE_CONFIG: "serverName=docker-server"
sf-api:
build:
context: ./sf-api
dockerfile: Dockerfile.nginx
container_name: sf-api
depends_on:
- php
- blackfire
- elasticsearch
env_file:
- ./sf-api/.env
ports:
- "8080:80"
volumes:
- ./sf-api/public:/app/sf-api/public:ro
- ./sf-api/public/build:/app/sf-api/build:ro
cache-proxy:
build:
context: ./sf-api/
dockerfile: ./Dockerfile.varnish
container_name: cache-proxy
depends_on:
- sf-api
# Comment out this volume in production
volumes:
- ./sf-api/docker/varnish/conf:/etc/varnish:ro
ports:
- "8081:80"
api-db:
# In production, you may want to use a managed database service
image: postgres:12.4
container_name: api-db
environment:
- POSTGRES_DB=sf-api
- POSTGRES_USER=symfony
- POSTGRES_PASSWORD=symfony
volumes:
- db-data:/var/lib/postgresql/data:rw
- ./sf-api/docker/postgres/initdb_uuid_ossp.sh:/docker-entrypoint-initdb.d/initdb_uuid_ossp.sh
ports:
- "5432:5432"
h2-proxy:
# Don't use this proxy in prod
build:
context: ./h2-proxy
dockerfile: ./Dockerfile
container_name: h2-proxy
depends_on:
- sf-api
- cache-proxy
ports:
- "80:80"
- "443:443"
- "8443:8443"
mailcatcher:
restart: always
container_name: mailcatcher
image: dockage/mailcatcher:0.6.5
ports:
- "1080:1080"
- "1025:1025"
rabbitmq:
image: rabbitmq:management-alpine
container_name: rabbitmp
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin
ports:
- "5672:5672"
- "15672:15672"
restart: always
volumes:
- rabbitmq-data:/var/lib/rabbitmq
redis:
container_name: redis
image: redis:alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
redis-commander:
container_name: redis-commander
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:redis:6379
- HTTP_USER=root
- HTTP_PASSWORD=root
ports:
- 8084:8081
depends_on:
- redis
blackfire:
image: blackfire/blackfire
ports:
- 8707:8707
container_name: blackfire
environment:
BLACKFIRE_SERVER_ID: ed0bb126-ad75-4131-99a9-3dca7d8fde9c
BLACKFIRE_SERVER_TOKEN: 6db03d66126bed8078827d8791038c6b84c7154249e987e4ca808383e030c91d
BLACKFIRE_CLIENT_ID: cc5bb7a3-8a4a-45d4-bd0b-efab0d546a05
BLACKFIRE_CLIENT_TOKEN: ef8062e7b586e23d5ef3025113ad154b05de7fe2918bfcbcd8873a9f2cb1f757
elasticsearch:
build:
context: elasticsearch/
args:
ELK_VERSION: 7.4.2
volumes:
- type: bind
source: ./elasticsearch/config/elasticsearch.yml
target: /usr/share/elasticsearch/config/elasticsearch.yml
read_only: true
- type: volume
source: elasticsearch
target: /usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ELASTIC_PASSWORD: changeme
networks:
- elk
logstash:
build:
context: logstash/
args:
ELK_VERSION: 7.4.2
volumes:
- type: bind
source: ./logstash/config/logstash.yml
target: /usr/share/logstash/config/logstash.yml
read_only: true
- type: bind
source: ./logstash/pipeline
target: /usr/share/logstash/pipeline
read_only: true
ports:
- "5000:5000"
- "9600:9600"
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- elk
depends_on:
- elasticsearch
kibana:
build:
context: kibana/
args:
ELK_VERSION: 7.4.2
volumes:
- type: bind
source: ./kibana/config/kibana.yml
target: /usr/share/kibana/config/kibana.yml
read_only: true
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
networks:
- elk
depends_on:
- elasticsearch
networks:
elk:
driver: bridge
volumes:
db-data: {}
redis-data: {}
elasticsearch:
rabbitmq-data:
driver: local