I am running a WP container and a WP-CLI container, both configured in the same compose file. At the moment I have volumes configured like this:
# both WP and WP-CLI containers
./wp/root:/var/www/html
# WP container only
./wp/wp-content/mu-plugins:/var/www/html/wp-content/mu-plugins
./wp/wp-content/themes/my_theme:/var/www/html/wp-content/themes/my_theme
First volume definition allows me to use WP-CLI in a separate container (it needs access to WordPress files inside WP container), the other two allow me to persist my code on the host.
Does mounting the first volume like that degrade performance? Is there a better way to configure the stack so that I can both use the WP-CLI in a separate container and persist my code on the host in the project dir?
[ad_2]