[wp-trac] [WordPress Trac] #47767: Simplify and backport the local environment

WordPress Trac noreply at wordpress.org
Sun Jul 28 20:43:31 UTC 2019


#47767: Simplify and backport the local environment
-------------------------------------+-----------------------
 Reporter:  pento                    |       Owner:  pento
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.3
Component:  Build/Test Tools         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+-----------------------

Comment (by pbearne):

 Can we setup up to auto-connect to the DB and maybe do to the 'npm run
 dev' as part of the Docker build npm run env:start

 The fewer commands needed to get it up the better

 Maybe we need some version checks in the script


 I hadn't run env:install

 that failed


 {{{
 \SVN-core-wp> npm run env:install

 > WordPress at 5.3.0 env:install C:\Users\....\Documents\code\SVN-core-wp
 > dotenv npm run env:install-next


 > WordPress at 5.3.0 env:install-next C:\Users\....\Documents\code\SVN-core-
 wp
 > npm run env:install-config && npm run env:reset-site && npm run env
 :install-site


 > WordPress at 5.3.0 env:install-config C:\Users\....\Documents\code\SVN-
 core-wp
 > 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 .


 > WordPress at 5.3.0 env:cli C:\Users\....\Documents\code\SVN-core-wp
 > docker-compose -f ./tools/local-env/docker-compose.yml -f ./tools/local-
 env/docker-compose.scripts.yml run --rm cli "config" "create" "--
 dbname=wordpress_develop" "--dbuser=root" "--dbpass=password" "--
 dbhost=mysql" "--path=/var/www/src" "--force"

 Creating network "local-env_default" with the default driver
 Creating volume "local-env_phpunit-uploads" with default driver
 Pulling cli (garypendergast/wordpress-develop-cli:5.4-fpm)...
 5.4-fpm: Pulling from garypendergast/wordpress-develop-cli
 d4bce7fd68df: Pull complete
 a3ed95caeb02: Pull complete
 77a07a807b0b: Pull complete
 8e9dd06f34b8: Pull complete
 bdeb40d51bd7: Pull complete
 2c8127992730: Pull complete
 a5d836e0c192: Pull complete
 f30196191d1a: Pull complete
 dc7df7516240: Pull complete
 a790cf986177: Pull complete
 72cf88b6887f: Pull complete
 c83f126e8f01: Pull complete
 ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql' (111)
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! WordPress at 5.3.0 env:cli: `docker-compose -f ./tools/local-env
 /docker-compose.yml -f ./tools/local-env/docker-compose.scripts.yml run
 --rm cli "config" "create" "--dbname=wordpress_develop" "--dbuser=root" "
 --dbpass=password" "--dbhost=mysql" "--path=/var/www/src" "--force"`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the WordPress at 5.3.0 env:cli script.
 npm ERR! This is probably not a problem with npm. There is likely
 additional logging output above.

 npm ERR! A complete log of this run can be found in:
 npm ERR!     C:\Users\pbear\AppData\Roaming\npm-cache\_logs\2019-07
 -28T20_01_45_807Z-debug.log
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! WordPress at 5.3.0 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 .`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the WordPress at 5.3.0 env:install-config script.
 npm ERR! This is probably not a problem with npm. There is likely
 additional logging output above.

 npm ERR! A complete log of this run can be found in:
 npm ERR!     C:\Users\....\AppData\Roaming\npm-cache\_logs\2019-07
 -28T20_01_45_838Z-debug.log
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! WordPress at 5.3.0 env:install-next: `npm run env:install-config &&
 npm run env:reset-site && npm run env:install-site`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the WordPress at 5.3.0 env:install-next script.
 npm ERR! This is probably not a problem with npm. There is likely
 additional logging output above.

 npm ERR! A complete log of this run can be found in:
 npm ERR!     C:\Users\....\AppData\Roaming\npm-cache\_logs\2019-07
 -28T20_01_45_865Z-debug.log
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! WordPress at 5.3.0 env:install: `dotenv npm run env:install-next`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the WordPress at 5.3.0 env:install script.
 npm ERR! This is probably not a problem with npm. There is likely
 additional logging output above.

 npm ERR! A complete log of this run can be found in:
 npm ERR!     C:\Users\...\AppData\Roaming\npm-cache\_logs\2019-07
 -28T20_01_45_897Z-debug.log
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47767#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list