Make WordPress Core


Ignore:
Timestamp:
08/13/2022 11:23:26 PM (3 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Move the Memcached container into the Docker Compose config.

This allows a developer to use the persistent Memcached object cache on their local development environment via the LOCAL_PHP_MEMCACHED environment variable.

Enable the memcached config via LOCAL_PHP_MEMCACHED=true in the .env file and then restart the environment with npm run env:restart.

Fixes #55700

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docker-compose.yml

    r53636 r53895  
    4949      - ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
    5050      - ./:/var/www
     51
     52    # Copy or delete the Memcached dropin plugin file as appropriate.
     53    command: /bin/sh -c "if [ $LOCAL_PHP_MEMCACHED = true ]; then cp -n /var/www/tests/phpunit/includes/object-cache.php /var/www/src/wp-content/object-cache.php; else rm -f /var/www/src/wp-content/object-cache.php; fi && exec php-fpm"
    5154
    5255    depends_on:
     
    105108      - localhost:host-gateway
    106109
     110  ##
     111  # The Memcached container.
     112  ##
     113  memcached:
     114    image: memcached
     115
     116    networks:
     117      - wpdevnet
     118
     119    ports:
     120      - 11211:11211
     121
    107122volumes:
    108123  # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume.
Note: See TracChangeset for help on using the changeset viewer.