-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (51 loc) · 1.11 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
version: '3'
services:
wordpress_db:
container_name: wordpress_db
hostname: wordpress_db
build:
context: ./
dockerfile: Dockerfile.mysql
volumes:
- db_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=wordpress
- MYSQL_USER=user
- MYSQL_PASSWORD=password
ports:
- "3307:3306"
restart: always
phpmyadmin:
container_name: phpmyadmin
hostname: phpmyadmin
image: phpmyadmin/phpmyadmin
volumes:
- /sessions
environment:
- PMA_ARBITRARY=1
- PMA_HOST=wordpress_db
- PMA_PORT=3306
- PMA_USER=user
- PMA_PASSWORD=password
ports:
- 8001:80
restart: always
wordpress:
container_name: wordpress
build: ./
volumes:
- ./wordpress:/var/www/html
environment:
- MYSQL_HOST=wordpress_db
- MYSQL_PORT=3306
- MYSQL_DATABASE=wordpress
- MYSQL_USER=user
- MYSQL_PASSWORD=password
ports:
- "8000:80"
depends_on:
- wordpress_db
restart: always
volumes:
db_data: