-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (78 loc) · 1.97 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
version: "3.3"
services:
runner:
depends_on:
db:
condition: service_healthy
# Waits for wordpress in run_tests.sh
image: wordpress:cli
profiles: ["test"]
environment:
HOME: "/tmp"
# You can enable WordPress debug logging here:
WORDPRESS_DEBUG_MODE: false
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_TABLE_PREFIX: "wp_"
env_file:
- settings.env
volumes:
- wp_data:/var/www/html
- ./scripts:/scripts
- ./plugins:/plugins
user: www-data
entrypoint: bash /scripts/run_tests.sh
wordpress:
depends_on:
db:
condition: service_healthy
# You can modify the WordPress version here:
image: wordpress:latest
profiles: ["test"]
volumes:
- wp_data:/var/www/html
ports:
- 8000:80
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_TABLE_PREFIX: "wp_"
db:
image: mysql:5.7
profiles: ["test"]
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
healthcheck:
test: mysqladmin ping -h db --silent --password=wordpress
interval: 5s
retries: 4
timeout: 10s
submodule-updater:
image: alpine/git:latest
profiles: ["update"]
env_file:
- settings.env
volumes:
- ./:/repository
entrypoint: ash /repository/scripts/update_submodule.sh
cleaner:
image: alpine/git:latest
profiles: ["clean"]
env_file:
- settings.env
volumes:
- ./:/repository
entrypoint: ash /repository/scripts/clean.sh
volumes:
db_data:
wp_data: