-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwordpress-compose.yaml
55 lines (50 loc) · 1.57 KB
/
wordpress-compose.yaml
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
version: '3.1'
services:
test_wordpress:
restart: always
build:
context: .
dockerfile: wordpress-dockerfile
ports:
- 8000:80
environment:
WORDPRESS_DB_HOST: test_db
WORDPRESS_DB_USER: odoo_conn_test_user
WORDPRESS_DB_PASSWORD: password
WORDPRESS_DB_NAME: odoo_conn_test
volumes:
- wp_data:/var/www/html
- type: bind
source: ../../
target: /var/www/html/wp-content/plugins/odoo
# install composer before starting the apache server
command: '/bin/sh -c "cd /var/www/html/wp-content/plugins/odoo; composer install --no-cache --no-dev; cd /var/www/html/; docker-entrypoint.sh apache2-foreground"'
test_db:
restart: always
image: mysql:5.7
environment:
MYSQL_DATABASE: odoo_conn_test
MYSQL_USER: odoo_conn_test_user
MYSQL_PASSWORD: password
MYSQL_RANDOM_ROOT_PASSWORD: '1'
test_wpcli:
# 33:33 is the UID of the www-data user that created the WP files.
# There isn't a user associated with this UID in the newest WordPress cli container.
user: "33:33"
image: wordpress:cli
depends_on:
- test_wordpress
- test_db
command: '/bin/bash /var/www/html/wp-content/plugins/odoo/tests/end_to_end_tests/startup.sh'
environment:
WORDPRESS_DB_HOST: test_db
WORDPRESS_DB_USER: odoo_conn_test_user
WORDPRESS_DB_PASSWORD: password
WORDPRESS_DB_NAME: odoo_conn_test
volumes:
- wp_data:/var/www/html
- type: bind
source: ../../
target: /var/www/html/wp-content/plugins/odoo
volumes:
wp_data: