2019-11-26 20:34:00 +00:00
|
|
|
version: '3.7'
|
2019-11-23 17:40:29 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
db:
|
2019-11-26 20:34:00 +00:00
|
|
|
image: mariadb:10.4
|
2019-11-23 17:40:29 +00:00
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: testdb
|
|
|
|
MYSQL_USER: wordpress
|
|
|
|
MYSQL_PASSWORD: wordpress
|
2019-11-26 20:34:00 +00:00
|
|
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
2019-11-23 17:40:29 +00:00
|
|
|
volumes:
|
|
|
|
- db:/var/lib/mysql
|
|
|
|
|
|
|
|
wordpress-woocomerce-dev:
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
ports:
|
|
|
|
- 8084:80
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
WORDPRESS_DB_HOST: db
|
|
|
|
WORDPRESS_DB_NAME: testdb
|
|
|
|
WORDPRESS_DB_USER: wordpress
|
|
|
|
WORDPRESS_DB_PASSWORD: wordpress
|
|
|
|
WORDPRESS_TABLE_PREFIX: "wp_"
|
|
|
|
WORDPRESS_DEBUG: 1
|
|
|
|
volumes:
|
|
|
|
- wordpress:/var/www/html
|
|
|
|
|
|
|
|
wordpress-cli:
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- wordpress-woocomerce-dev
|
|
|
|
image: wordpress:cli
|
|
|
|
restart: on-failure
|
|
|
|
user: xfs
|
|
|
|
command: >
|
|
|
|
/bin/sh -c '
|
2019-11-24 13:49:39 +00:00
|
|
|
wp core install --url=http://localhost:8084 --title="WooCommerce Core E2E Test Suite" --admin_user=admin --admin_password=password --admin_email=admin@woocommercecoree2etestsuite.com --path=/var/www/html --skip-email;
|
2019-11-23 17:40:29 +00:00
|
|
|
wp plugin activate woocommerce;
|
2019-12-15 20:39:33 +00:00
|
|
|
wp theme install twentynineteen --activate;
|
2019-11-24 13:49:39 +00:00
|
|
|
wp user create customer customer@woocommercecoree2etestsuite.com --user_pass=password --role=customer --path=/var/www/html;
|
2019-12-15 16:44:40 +00:00
|
|
|
wp post create --post_type=page --post_status=publish --post_title='Ready' --post_content='E2E-tests.';
|
2019-11-23 17:40:29 +00:00
|
|
|
'
|
|
|
|
volumes:
|
|
|
|
- wordpress:/var/www/html
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
db:
|
|
|
|
wordpress:
|