-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
103 lines (96 loc) · 2.17 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
services:
php:
build:
context: docker/php
dockerfile: Dockerfile
restart: on-failure
volumes:
- '.:/var/www'
environment:
XDEBUG_PORT: ${XDEBUG_PORT:-9003}
XDEBUG_IDEKEY: ${XDEBUG_IDEKEY:-IDEKEY}
depends_on:
- mysql
- redis
- memcached
- rabbitmq
networks:
- app_network
extra_hosts:
- 'host.docker.internal:host-gateway'
nginx:
build:
context: docker/nginx
dockerfile: Dockerfile
args:
ROOT_PATH: ${ROOT_PATH:-/var/www/public}
restart: on-failure
ports:
- '${APP_PORT:-80}:80'
- '${APP_SECURE_PORT:-443}:443'
volumes:
- '.:/var/www'
environment:
NGINX_HOST: ${NGINX_HOST:-app.local}
links:
- php
depends_on:
- php
networks:
- app_network
mysql:
image: mysql:8.0
restart: on-failure
ports:
- '${MYSQL_PORT:-3306}:3306'
volumes:
- 'mysql_volume:/var/lib/mysql'
environment:
MYSQL_DATABASE: ${DB_DATABASE:-app}
MYSQL_USER: ${DB_USERNAME:-app}
MYSQL_PASSWORD: ${DB_PASSWORD:-app}
MYSQL_ROOT_USER: ${DB_ROOT_USERNAME:-uroot}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-proot}
networks:
- app_network
redis:
image: redis:6.2-alpine
restart: on-failure
ports:
- '${REDIS_PORT:-6379}:6379'
volumes:
- 'redis_volume:/var/lib/redis'
environment:
REDIS_REPLICATION_MODE: master
networks:
- app_network
memcached:
image: memcached:1.6-alpine
restart: on-failure
ports:
- '${MEMCACHED_PORT:-11211}:11211'
networks:
- app_network
rabbitmq:
image: rabbitmq:3.8-management-alpine
restart: on-failure
ports:
- '${RABBITMQ_PORT:-5672}:5672'
- '${RABBITMQ_MANAGEMENT_PORT:-15672}:15672'
volumes:
- 'rabbitmq_volume:/var/lib/rabbitmq'
environment:
RABBITMQ_DEFAULT_USER: "${RABBITMQ_USER:-guest}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_PASS:-guest}"
networks:
- app_network
networks:
app_network:
driver: bridge
volumes:
mysql_volume:
driver: local
redis_volume:
driver: local
rabbitmq_volume:
driver: local