-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
83 lines (77 loc) · 2.24 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
version: '3'
services:
codecept_db:
image: mariadb:10.2
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
networks:
codecept:
aliases:
- codecept_db
codeception_testing:
image: wp-graphql/codeception-testing:${WP_VERSION:-latest}
build:
context: ./docker
dockerfile: codeception.Dockerfile
args:
PHP_VERSION: ${PHP_VERSION:-8.0}
depends_on:
- codecept_db
ports:
- "8080:80"
volumes:
- ./local/public:/var/www/html # WP core files.
- .:/var/www/html/wp-content/plugins/wp-graphql-testcase
- ./local/config/.htaccess:/var/www/html/.htaccess
- ./local/config/enable-app-passwords.php:/var/www/html/wp-content/mu-plugins/enable-app-passwords.php
env_file: .env.testing
environment:
WORDPRESS_DOMAIN: localhost
COMPOSER_HOME: /tmp/.composer
APACHE_RUN_USER: "#1000" # Ensure Apache can write to the filesystem.
networks:
codecept:
aliases:
- codeception_testing
phpunit_db:
image: mariadb:10.2
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "wordpress"
MYSQL_ROOT_PASSWORD: ""
networks:
phpunit:
aliases:
- phpunit_db
wp_phpunit_testing:
image: wp-graphql/wp-phpunit-testing:${WP_VERSION:-latest}
build:
context: ./docker
dockerfile: wp-phpunit.Dockerfile
args:
PHP_VERSION: ${PHP_VERSION:-8.0}
depends_on:
- phpunit_db
ports:
- "8081:80"
volumes:
- ./local/public:/var/www/html # WP core files.
- .:/var/www/html/wp-content/plugins/wp-graphql-testcase
- ./local/config/wp-tests-config.php:/var/www/html/wp-tests-config.php
env_file: .env.testing
environment:
COMPOSER_HOME: /tmp/.composer
APACHE_RUN_USER: "#1000" # Ensure Apache can write to the filesystem.
WP_TESTS_DIR: /var/www/html/wp-content/plugins/wp-graphql-testcase/vendor/wp-phpunit/wp-phpunit
WP_PHPUNIT__TESTS_CONFIG: /var/www/html/wp-tests-config.php
networks:
phpunit:
aliases:
- wp_phpunit_testing
networks:
phpunit:
codecept: