-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
92 lines (92 loc) · 2.8 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
version: '3.7'
services:
php:
image: bscheshir/php:7.4.3-fpm-alpine-4yii2-xdebug
restart: always
volumes:
- ../php-data:/var/www/html #php-data
- ~/.composer/cache:/root/.composer/cache
depends_on:
- db
environment:
TZ: Europe/Moscow
XDEBUG_CONFIG: "remote_host=${DEV_REMOTE_HOST} remote_port=${DEV_REMOTE_PORT} var_display_max_data=1024 var_display_max_depth=5"
PHP_IDE_CONFIG: "serverName=${DEV_SERVER_NAME}"
php-supervisor: # for workers
image: bscheshir/php:7.4.3-fpm-alpine-4yii2-supervisor-xdebug
restart: always
volumes:
- ../php-data:/var/www/html #php-data
- ../supervisor-conf:/etc/supervisor/conf.d
- ../supervisor-logs:/var/log/supervisor
depends_on:
- db
environment:
TZ: Europe/Moscow
XDEBUG_CONFIG: "remote_host=${DEV_REMOTE_HOST} remote_port=${DEV_REMOTE_PORT_SUPERVISOR} var_display_max_data=1024 var_display_max_depth=5"
PHP_IDE_CONFIG: "serverName=${DEV_SERVER_NAME}"
redis:
image: redis:5.0.7-alpine
restart: always
command: redis-server /etc/redis/conf.d/redis.conf --requirepass yii2advancedredis
ports:
- "6379"
volumes:
- ../redis-data:/data
- ../redis-conf:/etc/redis/conf.d
depends_on:
- php-supervisor
environment:
TZ: Europe/Moscow
nginx:
image: nginx:1.17.8-alpine
restart: always
ports:
- "8080:8080"
- "8081:8081"
depends_on:
- php
volumes:
- ../php-data:/var/www/html #php-data
- ../nginx-conf:/etc/nginx/conf.d #nginx-conf
- ../nginx-logs:/var/log/nginx #nginx-logs
environment:
TZ: Europe/Moscow
mysql:
image: mysql:8.0.19
entrypoint:
- '/entrypoint.sh'
- '--default-authentication-plugin=mysql_native_password' # https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
restart: always
expose:
- "3306" #for service mysql-proxy
ports:
- "3307:3306" #for external connection
volumes:
- ../mysql-data/db:/var/lib/mysql #mysql-data
environment:
TZ: Europe/Moscow
MYSQL_ROOT_PASSWORD: yii2advanced
MYSQL_DATABASE: yii2advanced
MYSQL_USER: yii2advanced
MYSQL_PASSWORD: yii2advanced
db: #mysql-proxy
image: bscheshir/mysql-proxy:0.8.5
expose:
- "3306" #for service php
ports:
- "3308:3306" #for external connection
restart: always
volumes:
- ../mysql-proxy-conf:/opt/mysql-proxy/conf
- ../mysql-proxy-logs:/opt/mysql-proxy/logs
depends_on:
- mysql
environment:
TZ: Europe/Moscow
PROXY_DB_HOST:
PROXY_DB_PORT: 3306
REMOTE_DB_HOST: mysql
REMOTE_DB_PORT: 3306
LUA_SCRIPT: "/opt/mysql-proxy/conf/log.lua"
LOG_FILE: "/opt/mysql-proxy/logs/mysql.log"