-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·163 lines (151 loc) · 4.09 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
version: '3.8'
services:
nginx:
image: nginx:alpine
container_name: ${COMPOSE_PROJECT_NAME}-nginx
# restart: unless-stopped
volumes:
- ./www:/var/www/html
- ./docker/conf/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/conf/nginx/${COMPOSE_PROFILES}/templates:/etc/nginx/templates
- volume-mkcert:/root/mkcert
depends_on:
- php
- mkcert
ports:
- "${NGINX_PORT}:${NGINX_PORT}"
- "${NGINX_PORT_SSL}:${NGINX_PORT_SSL}"
environment:
NGINX_HOST: ${NGINX_HOST}
NGINX_PORT: ${NGINX_PORT}
NGINX_PORT_SSL: ${NGINX_PORT_SSL}
php:
build:
context: ./docker/images/php-${PHP_VERSION}
args:
- COMPOSE_PROFILES=${COMPOSE_PROFILES}
image: ${COMPOSE_PROJECT_NAME}-php:${PHP_VERSION}
container_name: ${COMPOSE_PROJECT_NAME}-php
volumes:
- ./www:/var/www/html
- ./docker/bash_history/php/.bash_history:/home/www-data/.bash_history
- volume-ca-certificates:/usr/local/share/ca-certificates
environment:
TZ: 'Europe/Moscow'
NGINX_HOST: ${NGINX_HOST}
XDEBUG_CONFIG: client_host=${XDEBUG_CLIENT_HOST} client_port=${XDEBUG_PORT}
XDEBUG_TRIGGER: ${XDEBUG_TRIGGER}
depends_on:
- memcached
- mailhog
- mysql
mysql:
image: mysql:${MYSQL_VERSION}
platform: ${PLATFORM}
container_name: ${COMPOSE_PROJECT_NAME}-mysql
# restart: unless-stopped
ports:
- "${MYSQL_PORT}:3306"
volumes:
- volume-mysql:/var/lib/mysql
- ./docker/conf/mysql:/etc/mysql/conf.d
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: 'Europe/Moscow'
phpmyadmin:
image: phpmyadmin:latest
container_name: ${COMPOSE_PROJECT_NAME}-phpmyadmin
# restart: unless-stopped
depends_on:
- mysql
ports:
- ${PHPMYADMIN_PORT}:80
environment:
PMA_HOST: mysql
memcached:
image: memcached:alpine
container_name: ${COMPOSE_PROJECT_NAME}-memcached
ports:
- "${MEMCACHED_PORT}:11211"
mailhog:
image: mailhog/mailhog
platform: ${PLATFORM}
container_name: ${COMPOSE_PROJECT_NAME}-mailhog
ports:
- "${MAILHOG_PORT_SMTP}:1025"
- "${MAILHOG_PORT_HTTP}:8025"
mkcert:
build: ./docker/images/mkcert
container_name: ${COMPOSE_PROJECT_NAME}-mkcert
environment:
NGINX_HOST: ${NGINX_HOST}
TZ: 'Europe/Moscow'
volumes:
- volume-mkcert:/root/mkcert
- volume-ca-certificates:/usr/local/share/ca-certificates
push-server-sub:
build: ./docker/images/push-server
profiles: [ "portal" ]
container_name: ${COMPOSE_PROJECT_NAME}-push-server-sub
depends_on:
- redis
ports:
- "8010"
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- LISTEN_HOSTNAME=0.0.0.0
- LISTEN_PORT=8010
- SECURITY_KEY=${PUSH_SERVER_SECRET_KEY}
- MODE=sub
push-server-pub:
build: ./docker/images/push-server
profiles: [ "portal" ]
container_name: ${COMPOSE_PROJECT_NAME}-push-server-pub
depends_on:
- redis
ports:
- "9010"
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- LISTEN_HOSTNAME=0.0.0.0
- LISTEN_PORT=9010
- SECURITY_KEY=${PUSH_SERVER_SECRET_KEY}
- MODE=pub
redis:
image: redis
profiles: [ "portal" ]
container_name: ${COMPOSE_PROJECT_NAME}-redis
cron:
build:
context: ./docker/images/cron
args:
- COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}
- PHP_VERSION=${PHP_VERSION}
image: ${COMPOSE_PROJECT_NAME}-cron:php${PHP_VERSION}
container_name: ${COMPOSE_PROJECT_NAME}-cron
logging:
driver: "json-file"
options:
max-size: "800k"
max-file: "3"
volumes:
- ./www:/var/www/html
environment:
TZ: 'Europe/Moscow'
depends_on:
- php
volumes:
volume-mysql:
volume-mkcert:
volume-ca-certificates:
volume-www:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: ${APP_CODE_PATH_HOST}