Ticket #47767: 47767.4.diff
File 47767.4.diff, 5.5 KB (added by , 6 years ago) |
---|
-
new file .env
diff --git a/.env b/.env new file mode 100644 index 0000000000..5d57cfb221
- + 1 LOCAL_PORT=8889 2 LOCAL_DIR=src -
package.json
diff --git a/package.json b/package.json index 35a4c20e28..265da5b404 100644
a b 9 9 "author": "The WordPress Contributors", 10 10 "license": "GPLv2 or later", 11 11 "devDependencies": { 12 "copyfiles": "^2.1.1", 13 "cross-env": "^5.2.0", 14 "cross-var": "^1.1.0", 15 "dotenv-cli": "^2.0.1", 12 16 "grunt": "~0.4.1", 13 17 "grunt-contrib-clean": "~0.5.0", 18 "grunt-contrib-compress": "~0.5.2", 19 "grunt-contrib-concat": "~0.3.0", 14 20 "grunt-contrib-copy": "~0.4.1", 15 21 "grunt-contrib-cssmin": "~0.6.1", 16 22 "grunt-contrib-qunit": "~0.2.2", 17 23 "grunt-contrib-uglify": "~0.2.2", 18 24 "grunt-contrib-watch": "~0.5.1", 19 "grunt-contrib-compress": "~0.5.2", 20 "grunt-contrib-concat": "~0.3.0", 21 "matchdep": "~0.1.2" 25 "matchdep": "~0.1.2", 26 "wait-on": "^3.3.0" 27 }, 28 "scripts": { 29 "build": "grunt build", 30 "test": "grunt test", 31 "watch": "grunt watch", 32 "grunt": "grunt", 33 34 "docker:start": "docker-compose -f ./tools/local-env/docker-compose.yml up -d", 35 "docker:stop": "docker-compose -f ./tools/local-env/docker-compose.yml down", 36 37 "env:start": "dotenv npm run docker:start", 38 "env:stop": "dotenv npm run docker:stop", 39 40 "env:install": "dotenv npm run env:install-next", 41 "env:install-next": "npm run env:install-config && npm run env:reset-site && npm run env:install-site", 42 "env:install-config": "npm run env:cli config create -- --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --path=/var/www/src --force && copyfiles -f src/wp-config.php .", 43 "env:install-site": "cross-var wait-on tcp:localhost:$LOCAL_PORT && cross-var npm run env:cli core install -- --title=WPDEV --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:$LOCAL_PORT --quiet", 44 "env:reset-site": "cross-var wait-on tcp:localhost:$LOCAL_PORT && npm run env:cli db reset -- --yes --quiet", 45 46 "env:cli": "docker-compose -f ./tools/local-env/docker-compose.yml -f ./tools/local-env/docker-compose.scripts.yml run --rm cli", 47 48 "test:e2e": "dotenv npm run test:e2e-next", 49 "test:e2e-next": "cross-var cross-env WP_BASE_URL=http://localhost:$LOCAL_PORT wp-scripts test-e2e --config tests/e2e/jest.config.js" 22 50 } 23 51 } -
new file tools/local-env/default.template
diff --git a/tools/local-env/default.template b/tools/local-env/default.template new file mode 100644 index 0000000000..e0a161926b
- + 1 server { 2 index index.php index.html; 3 4 listen 80 default_server; 5 listen [::]:80 default_server; 6 7 server_name localhost; 8 9 client_max_body_size 1g; 10 11 error_log /var/log/nginx/error.log; 12 access_log /var/log/nginx/access.log; 13 14 root /var/www/${LOCAL_DIR}; 15 16 location / { 17 try_files $uri $uri/ /index.php?$args; 18 } 19 20 location ~ \.php$ { 21 try_files $uri =404; 22 fastcgi_split_path_info ^(.+\.php)(/.+)$; 23 fastcgi_pass php:9000; 24 fastcgi_index index.php; 25 include fastcgi_params; 26 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 27 fastcgi_param PATH_INFO $fastcgi_path_info; 28 } 29 } -
new file tools/local-env/docker-compose.scripts.yml
diff --git a/tools/local-env/docker-compose.scripts.yml b/tools/local-env/docker-compose.scripts.yml new file mode 100644 index 0000000000..cf674c9a68
- + 1 version: '3.7' 2 3 services: 4 cli: 5 image: garypendergast/wordpress-develop-cli:5.4-fpm 6 volumes: 7 - ../../:/var/www 8 9 phpunit: 10 image: garypendergast/wordpress-develop-phpunit 11 volumes: 12 - ./phpunit-config.ini:/usr/local/etc/php/conf.d/phpunit-config.ini 13 - ../../:/wordpress-develop 14 init: true 15 16 volumes: 17 phpunit-uploads: {} -
new file tools/local-env/docker-compose.yml
diff --git a/tools/local-env/docker-compose.yml b/tools/local-env/docker-compose.yml new file mode 100644 index 0000000000..077a3258f4
- + 1 version: '3.7' 2 3 services: 4 wordpress-develop: 5 image: nginx:alpine 6 ports: 7 - ${LOCAL_PORT-8889}:80 8 environment: 9 LOCAL_DIR: ${LOCAL_DIR-src} 10 command: /bin/sh -c "envsubst '$$LOCAL_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" 11 volumes: 12 - ./default.template:/etc/nginx/conf.d/default.template 13 - ../../:/var/www 14 links: 15 - php 16 17 php: 18 image: garypendergast/wordpress-develop-php:5.4-fpm 19 volumes: 20 - ./php-config.ini:/usr/local/etc/php/conf.d/php-config.ini 21 - ../../:/var/www 22 links: 23 - mysql 24 25 mysql: 26 image: mysql:5.6 27 environment: 28 MYSQL_ROOT_PASSWORD: password 29 MYSQL_DATABASE: wordpress_develop 30 volumes: 31 - mysql:/var/lib/mysql 32 33 volumes: 34 mysql: {} -
new file tools/local-env/php-config.ini
diff --git a/tools/local-env/php-config.ini b/tools/local-env/php-config.ini new file mode 100644 index 0000000000..1f385e924c
- + 1 upload_max_filesize = 1G 2 post_max_size = 1G -
new file tools/local-env/phpunit-config.ini
diff --git a/tools/local-env/phpunit-config.ini b/tools/local-env/phpunit-config.ini new file mode 100644 index 0000000000..bf4788b33d
- + 1 upload_max_filesize = 1G 2 post_max_size = 1G 3 4 opcache.enable = 1 5 opcache.enable_cli = 1 6 opache.file_cache = /tmp/php-opcache -
new file wp-cli.yml
diff --git a/wp-cli.yml b/wp-cli.yml new file mode 100644 index 0000000000..3e2c616dfc
- + 1 path: src/