-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 loc) · 1.03 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
version: '3'
services:
db:
image: mysql:${MYSQL_VERSION}
container_name: mysql
volumes:
- db_data:/var/lib/mysql
- ./my.cnf:/etc/my.cnf
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
ports:
- "3306:3306"
web:
image: mojiz/php:7
build: .
container_name: php_web
depends_on:
- db
volumes:
- ./www/:/var/www/html/
ports:
- "8080:80"
environment:
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DB_HOST: db
WEB_HOST: http://localhost:8080/
stdin_open: true
tty: true
pma:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
# https://docs.phpmyadmin.net/en/latest/setup.html#docker-environment-variables
PMA_HOST: db
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
ports:
- 8081:80
depends_on:
- db
volumes:
db_data: