forked from wp-graphql/wp-graphql-woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
104 lines (97 loc) · 2.95 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '3.3'
services:
# Main application database.
app_db:
image: mysql
volumes:
- app_db_data
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD:-password}
MYSQL_DATABASE: ${DB_NAME:-wordpress}
MYSQL_USER: ${DB_USER:-wordpress}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
networks:
development:
# Capture and display all email sent by WordPress.
mailhog:
image: mailhog/mailhog
ports:
- "1025:1025"
- "8025:8025"
networks:
development:
# Main application service
testable_app:
image: woographql/wordpress-dev:${WP_VERSION:-latest}
depends_on:
- app_db
- mailhog
build:
context: .
args:
PHP_VERSION: ${PHP_VERSION:-8.0}
volumes:
- .:/var/www/html/wp-content/plugins/wp-graphql-woocommerce
- ./codeception.dist.yml:/var/www/html/wp-content/plugins/wp-graphql-woocommerce/codeception.yml
- ./local/public:/var/www/html # WP core files.
- ./local/.htaccess:/var/www/html/.htaccess
- ./.log/testable_app:/var/log/apache2
env_file: .env.testing
environment:
APACHE_RUN_USER: "#1000" # Ensure Apache can write to the filesystem.
XDEBUG_CONFIG: remote_host=10.0.0.52 idekey=vscode
networks:
development:
ports:
- "9001:9001"
# Main application database clone for testing inside the main application service.
testing_db:
image: mysql
volumes:
- ./local/db:/docker-entrypoint-initdb.d
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD:-password}
MYSQL_DATABASE: ${DB_NAME:-wordpress}
MYSQL_USER: ${DB_USER:-wordpress}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
networks:
development:
testing:
aliases:
- app_db
# Standalone testing application service (for inside of CI).
run_tests:
image: woographql/wordpress-ci:${WP_VERSION:-latest}
depends_on:
- testing_db
build:
context: .
args:
PHP_VERSION: ${PHP_VERSION:-7.3}
volumes:
- .:/var/www/html/wp-content/plugins/wp-graphql-woocommerce
- ./codeception.dist.yml:/var/www/html/wp-content/plugins/wp-graphql-woocommerce/codeception.yml
- ./local/public:/var/www/html # WP core files.
- ./local/.htaccess:/var/www/html/.htaccess
- ./.log/run_tests:/var/log/apache2
env_file: .env.testing
environment:
RUNNING_TEST_STANDALONE: 1
GRAPHQL_DEBUG: 1
WPGRAPHQL_WOOCOMMERCE_AUTOLOAD: 1
APACHE_RUN_USER: "#1000" # Ensure Apache can write to the filesystem.
WORDPRESS_DOMAIN: localhost
WP_SITEURL: http://localhost
WP_HOME: http://localhost
command: ./setup-database.sh testing codecept run ${FILTER:-}
networks:
testing:
aliases:
- run_tests
networks:
development:
testing:
volumes:
app_db_data: {}