-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
159 lines (151 loc) · 3.74 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
version: '3.7'
services:
nginx:
restart: always
hostname: "${APP_NAME}_nginx"
image: "${APP_NAME}_nginx"
container_name: "${APP_NAME}_nginx"
build:
context: .
dockerfile: ./environments/development/Dockerfile-nginx
volumes:
- ${APPLICATION}:/var/www/html
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
ports:
- ${NGINX_HOST_HTTP_PORT}:80
- ${NGINX_HOST_HTTPS_PORT}:443
links:
- app
networks:
- app_network
app:
restart: always
hostname: "${APP_NAME}_app"
image: "${APP_NAME}_php"
container_name: "app"
build:
context: .
dockerfile: Dockerfile
args:
APP_DEBUG: ${APP_DEBUG}
ports:
- ${FPM_PORT}:9000
volumes:
- ${APPLICATION}:/var/www/html
environment:
- COMPOSER_MEMORY_LIMIT=-1
- PHP_IDE_CONFIG="serverName=Localhost"
links:
- mysql
- rabbitmq
depends_on:
- rabbitmq
networks:
- app_network
mysql:
restart: always
hostname: "${APP_NAME}_mysql"
image: "${APP_NAME}_mysql"
container_name: "${APP_NAME}_mysql"
build:
context: .
dockerfile: ./environments/development/Dockerfile-mysql
command: ["mysqld", "--default-authentication-plugin=mysql_native_password"]
ports:
- ${DB_PORT}:3306
volumes:
- database:/var/lib/mysql
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
networks:
app_network:
aliases:
- mysql
elasticsearch:
hostname: "${APP_NAME}_elasticsearch"
image: "${APP_NAME}_elasticsearch"
container_name: "${APP_NAME}_elasticsearch"
build:
context: .
dockerfile: ./environments/development/Dockerfile-elasticsearch
ports:
- ${ELASTIC_HTTP}:9200
- ${ELASTIC_HTTPS}:9300
environment:
discovery.type: "single-node"
ES_JAVA_OPTS: "-Xms2g -Xmx2g"
xpack.security.enabled: "false"
xpack.monitoring.templates.enabled: "true"
volumes:
- esdata:/usr/share/elasticsearch/data
networks:
- app_network
kibana:
hostname: "${APP_NAME}_kibana"
image: "${APP_NAME}_kibana"
container_name: "${APP_NAME}_kibana"
build:
context: .
dockerfile: ./environments/development/Dockerfile-kibana
ports:
- ${KIBANA_PORT}:5601
environment:
ELASTICSEARCH_URL: ${ELASTIC_HOST}
depends_on:
- elasticsearch
links:
- elasticsearch
networks:
- app_network
rabbitmq:
hostname: "${APP_NAME}_rabbitmq"
image: "${APP_NAME}_app_rabbitmq"
container_name: "${APP_NAME}_rabbitmq"
build:
context: .
dockerfile: ./environments/development/Dockerfile-rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
volumes:
- rmqdata:/var/lib/rabbitmq
ports:
- ${RABBITMQ_PORT}:5672
- ${RABBITMQ_PORT_HTTPS}:15672
networks:
- app_network
redis:
hostname: "${APP_NAME}_redis"
image: "${APP_NAME}_redis"
container_name: "${APP_NAME}_redis"
build:
context: .
dockerfile: ./environments/development/Dockerfile-redis
ports:
- ${REDIS_PORT}:6379
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- cache:/data
depends_on:
- app
links:
- app
networks:
- app_network
volumes:
database:
name: ${APP_NAME}_db_vol
rmqdata:
name: ${APP_NAME}_rmq_vol
cache:
name: ${APP_NAME}_cache_vol
esdata:
name: ${APP_NAME}_es_vol
driver: local
networks:
app_network:
driver: bridge
name: ${APP_NAME}_network