woocommerce/docker-compose.yaml

58 lines
1.6 KiB
YAML
Raw Normal View History

version: '3.7'
services:
db:
2020-03-03 11:31:11 +00:00
image: mariadb:10.5
restart: on-failure
environment:
MYSQL_DATABASE: testdb
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
volumes:
- db:/var/lib/mysql
2019-12-23 18:14:14 +00:00
wordpress-woocommerce-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:
- "./:/var/www/html/wp-content/plugins/woocommerce"
- wordpress:/var/www/html
wordpress-cli:
depends_on:
- db
2019-12-23 18:14:14 +00:00
- wordpress-woocommerce-dev
image: wordpress:cli
restart: on-failure
user: xfs
command: >
/bin/sh -c '
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;
wp plugin activate woocommerce;
2019-12-15 20:39:33 +00:00
wp theme install twentynineteen --activate;
wp user create customer customer@woocommercecoree2etestsuite.com --user_pass=password --role=customer --path=/var/www/html;
wp post create --post_type=page --post_status=publish --post_title='Ready' --post_content='E2E-tests.';
'
volumes:
- "./:/var/www/html/wp-content/plugins/woocommerce"
- wordpress:/var/www/html
volumes:
db:
wordpress: