-
Notifications
You must be signed in to change notification settings - Fork 474
/
docker-compose.yml
87 lines (81 loc) · 2.73 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
version: '3.9'
services:
db:
image: mysql:8.0.31
command: ["--default-authentication-plugin=mysql_native_password"]
ports:
- "${MYSQL_PORT}:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./db:/var/lib/mysql
php:
build:
context: ./php-fpm
args:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE}
PHP_XDEBUG_CLIENT_PORT: ${PHP_XDEBUG_CLIENT_PORT}
PHP_XDEBUG_CLIENT_HOST: ${PHP_XDEBUG_CLIENT_HOST}
SYMFONY_CLI_VERSION: 4.27.4
ports:
- "${PHP_PORT}:9001"
volumes:
- ./symfony:/var/www/symfony:cached
- ./logs/symfony:/var/www/symfony/var/log:cached
depends_on:
- db
phpmyadmin:
image: phpmyadmin:5.2.0
environment:
- PMA_HOST=db
- PMA_USER=root
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- "${PHPMYADMIN_PORT}:80"
restart: always
nginx:
build:
context: ./nginx
args:
NGINX_SYMFONY_SERVER_NAME: ${NGINX_SYMFONY_SERVER_NAME}
KIBANA_PORT: ${KIBANA_PORT}
ports:
- "${NGINX_PORT}:80"
depends_on:
- php
environment:
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
- NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/templates
- NGINX_ENVSUBST_TEMPLATE_SUFFIX=.template
- NGINX_SYMFONY_SERVER_NAME=${NGINX_SYMFONY_SERVER_NAME}
volumes:
- ./logs/nginx:/var/log/nginx:cached
- ./symfony:/var/www/symfony:cached
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.5.1
environment:
discovery.type: "single-node"
xpack.security.enabled: false
ports:
- "${ELASTICSEARCH_PORT}:9200"
logstash:
image: docker.elastic.co/logstash/logstash:8.5.1
depends_on:
- elasticsearch
volumes:
- ./elk/logstash/pipelines.yml:/usr/share/logstash/config/pipelines.yml:cached
- ./elk/logstash/conf.d:/etc/logstash/conf.d:cached
- ./logs/symfony:/var/www/symfony/var/log:cached
- ./logs/nginx:/var/log/nginx:cached
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:8.5.1
environment:
SERVER_NAME: localhost
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ports:
- "${KIBANA_PORT}:5601"