-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 1.13 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
version: '3.7'
services:
web:
build: .
ports:
- ${PORT}:80
environment:
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- YII2_ENV=${YII2_ENV}
- FE_HOST=${FE_HOST}
- BE_HOST=${BE_HOST}
- VIRTUAL_HOST=${FE_HOST},${BE_HOST}
volumes:
# Re-use local composer cache via host volume
- composer-cache:/root/.composer/cache:delegated
# Mount source code
- ./:/app
depends_on:
- db
restart: unless-stopped
db:
image: mariadb:10.7
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
restart: unless-stopped
phpmyadmin:
image: phpmyadmin/phpmyadmin:5.1
ports:
- ${PMA_PORT}:80
environment:
- PMA_HOST=${MYSQL_HOST}
- UPLOAD_LIMIT=512M
depends_on:
- db
restart: unless-stopped
volumes:
composer-cache: