Make WordPress Core


Ignore:
Timestamp:
08/12/2019 08:28:33 AM (6 years ago)
Author:
pento
Message:

Build Tools: Miscellaneous local-env improvements.

  • Move the functionality for controlling local-env out of package.json, into JS scripts.
  • Merge the docker-compose config files, and move it to the root directory. This allows docker-compose.override.yml to work for local overrides.
  • Fix nginx redirecting to port 80 under some circumstances.
  • npm run env:install now creates wp-tests.config.php for you.
  • Cleaned up a bunch of cruft in .travis.yml.

See #47767.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1414jsdoc
        1515vendor
         16docker-compose.override.yml
  • trunk/tools/local-env/docker-compose.yml

    r45762 r45783  
    1919
    2020    volumes:
    21       - ./default.template:/etc/nginx/conf.d/default.template
    22       - ../../:/var/www
     21      - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template
     22      - ./:/var/www
    2323
    2424    # Load our config file, substituning environment variables into the config.
     
    4242
    4343    volumes:
    44       - ./php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
    45       - ../../:/var/www
     44      - ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
     45      - ./:/var/www
    4646
    4747    depends_on:
     
    6161
    6262    volumes:
    63       - ./mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql
     63      - ./tools/local-env/mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql
    6464      - mysql:/var/lib/mysql
    6565
     
    6767    command: --default-authentication-plugin=mysql_native_password
    6868
     69  ##
     70  # The WP CLI container.
     71  ##
     72  cli:
     73    image: wordpressdevelop/cli:${LOCAL_PHP-latest}
     74
     75    networks:
     76      - wpdevnet
     77
     78    environment:
     79      LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
     80      LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
     81
     82    volumes:
     83      - ./:/var/www
     84
     85    # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
     86    init: true
     87
     88  ##
     89  # The PHPUnit container.
     90  ##
     91  phpunit:
     92    image: wordpressdevelop/phpunit:${LOCAL_PHP-latest}
     93
     94    networks:
     95      - wpdevnet
     96
     97    environment:
     98      LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
     99      LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
     100
     101    volumes:
     102      - ./tools/local-env/phpunit-config.ini:/usr/local/etc/php/conf.d/phpunit-config.ini
     103      - ./:/wordpress-develop
     104      - phpunit-uploads:/wordpress-develop/${LOCAL_DIR-src}/wp-content/uploads
     105
     106    # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
     107    init: true
     108
     109    depends_on:
     110      - mysql
     111
    69112volumes:
    70113  # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume.
    71114  mysql: {}
     115  # Using a volume for the uploads directory improves PHPUnit performance.
     116  phpunit-uploads: {}
    72117
    73118networks:
Note: See TracChangeset for help on using the changeset viewer.