-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
55 lines (51 loc) · 1.05 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
version: '2'
services:
wordpress:
container_name: wp-docker-wordpress
build:
context: .
dockerfile: dockerfile-wordpress
depends_on:
- db
- composer
links:
- db
- composer
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: wordpress
volumes:
- .:/var/www/html
db:
container_name: wp-docker-mysql
image: mysql:5.7
volumes:
- "./.data/db:/var/lib/mysql"
ports:
- "3306"
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
composer:
container_name: wp-docker-composer
restart: 'no'
build:
context: .
dockerfile: dockerfile-composer
npm:
container_name: wp-docker-npm
restart: 'no'
build:
context: .
dockerfile: dockerfile-npm
command: "npm run dev"
restart: always
working_dir: /var/www/html
volumes:
- .:/var/www/html