name: wordpress-fontawesome-local-dev x-dev_env_volumes: &dev_env_volumes volumes: # This wordpress bind mount could be uncommented in order to get access in the host # to the wordpress installation used by the container, such as for debugging. # Normally, it's best to leave it uncommented, because: # # 1. performance: the more is bind-mounted, the longer it takes to start up # the container, and there are quite a few files under wordress. # # 2. isolation: when there *is* something already mounted on /var/www/html, # that will be used for the wordpress install *instead* of the container # using its own version. # - ./volumes/wordpress:/var/www/html # The bind mount for this plugin. The effect is that the entire directory structure # of this repo is mounted inside the container under /var/www/html/wp-content/plugins/font-awesome # As a result, Docker will have a lot of work to do if there are a lot of files. # Under Docker for Mac Desktop, performance due to keeping the host # and container filesystems in sync can get slow and bothersome, especially when # starting up the container. But also when doing a bit filesystem churn, like # removing or rebuilding admin/node_modules, which involves 10s of thousands # of files. # # Docker doesn't seem to have feature for ignoring specified files or paths, # but there's a trick to accomplish a similar result that works. See below # how we ignore subdirectories. - .:/var/www/html/wp-content/plugins/font-awesome # Bind mounts for integration themes or plugins - ./integrations/js:/var/www/html/wp-content/js - ./integrations/themes/theme-alpha:/var/www/html/wp-content/themes/theme-alpha - ./integrations/themes/theme-mu:/var/www/html/wp-content/themes/theme-mu - ./integrations/plugins/plugin-beta:/var/www/html/wp-content/plugins/plugin-beta - ./integrations/plugins/plugin-gamma:/var/www/html/wp-content/plugins/plugin-gamma - ./integrations/plugins/plugin-delta:/var/www/html/wp-content/plugins/plugin-delta - ./integrations/plugins/plugin-epsilon:/var/www/html/wp-content/plugins/plugin-epsilon - ./integrations/plugins/plugin-zeta:/var/www/html/wp-content/plugins/plugin-zeta - ./integrations/plugins/plugin-eta:/var/www/html/wp-content/plugins/plugin-eta - ./integrations/plugins/plugin-lambda:/var/www/html/wp-content/plugins/plugin-lambda - ./integrations/plugins/plugin-kappa:/var/www/html/wp-content/plugins/plugin-kappa - ./integrations/plugins/plugin-sigma:/var/www/html/wp-content/plugins/plugin-sigma - ./integrations/plugins/plugin-nu:/var/www/html/wp-content/plugins/plugin-nu - ./integrations/plugins/font-awesome-cleanup:/var/www/html/wp-content/plugins/font-awesome-cleanup # Explicitly ignore various subdirectories like this, listing the target path # on the container filesystem. The result will be that the directory will exist # but it will be empty, thus relieving Docker of the burden to keep its files # in sync between the host and container. # # ignores for the local plugin repo and working directory - /var/www/html/wp-content/plugins/font-awesome/block-editor/node_modules - /var/www/html/wp-content/plugins/font-awesome/classic-editor/node_modules - /var/www/html/wp-content/plugins/font-awesome/icon-chooser/node_modules - /var/www/html/wp-content/plugins/font-awesome/admin/node_modules - /var/www/html/wp-content/plugins/font-awesome/docs - /var/www/html/wp-content/plugins/font-awesome/docsrv - /var/www/html/wp-content/plugins/font-awesome/phpdoc-data - /var/www/html/wp-content/plugins/font-awesome/tmp - /var/www/html/wp-content/plugins/font-awesome/volumes - /var/www/html/wp-content/plugins/font-awesome/wp-dist - /var/www/html/wp-content/plugins/font-awesome/images - /var/www/html/wp-content/plugins/font-awesome/assets - /var/www/html/wp-content/plugins/font-awesome/.vscode - /var/www/html/wp-content/plugins/font-awesome/.idea - /var/www/html/wp-content/plugins/font-awesome/.git - /var/www/html/wp-content/plugins/font-awesome/docker - /var/www/html/wp-content/plugins/font-awesome/integrations # ignores for the stuff that plugin-sigma may pull into its vendor bundle # when doing composer update - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/docs - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/bin - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/docsrv - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/images - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/tests - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/admin/src - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/integrations - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/.git - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/assets - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/docker x-integration_env_volumes: &integration_env_volumes volumes: - ./integrations/js:/var/www/html/wp-content/js - ./integrations/themes/theme-alpha:/var/www/html/wp-content/themes/theme-alpha - ./integrations/themes/theme-mu:/var/www/html/wp-content/themes/theme-mu - ./integrations/plugins/plugin-beta:/var/www/html/wp-content/plugins/plugin-beta - ./integrations/plugins/plugin-gamma:/var/www/html/wp-content/plugins/plugin-gamma - ./integrations/plugins/plugin-delta:/var/www/html/wp-content/plugins/plugin-delta - ./integrations/plugins/plugin-epsilon:/var/www/html/wp-content/plugins/plugin-epsilon - ./integrations/plugins/plugin-zeta:/var/www/html/wp-content/plugins/plugin-zeta - ./integrations/plugins/plugin-eta:/var/www/html/wp-content/plugins/plugin-eta - ./integrations/plugins/plugin-sigma:/var/www/html/wp-content/plugins/plugin-sigma - ./integrations/plugins/plugin-lambda:/var/www/html/wp-content/plugins/plugin-lambda - ./integrations/plugins/plugin-kappa:/var/www/html/wp-content/plugins/plugin-kappa - ./integrations/plugins/plugin-nu:/var/www/html/wp-content/plugins/plugin-nu - ./integrations/plugins/font-awesome-cleanup:/var/www/html/wp-content/plugins/font-awesome-cleanup # ignores (see notes above) - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/docs - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/bin - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/docsrv - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/images - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/tests - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/admin/src - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/block-editor/src - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/classic-editor/src - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/icon-chooser/src - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/integrations - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/.git - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/assets - /var/www/html/wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/docker x-wordpress-defaults: &wordpress_defaults ports: - "8765:80" extra_hosts: - "dockerhost:169.254.254.254" # Makes host.docker.internal resolve to the docker host on Docker Engine for # Linux (20.10+), where it isn't provided automatically as it is on Docker # Desktop for Mac/Windows. Harmless on Docker Desktop. - "host.docker.internal:host-gateway" command: - apache2-custom.sh x-wordpress-dev-defaults: &wordpress_dev_defaults <<: *wordpress_defaults networks: wordpress_network: name: wordpress_local_dev_network services: wpdb: image: mariadb:10.5.8 ports: - "3306:3306" volumes: - wpdb_data:/var/lib/mysql env_file: - ".env" container_name: "com.fontawesome.wpdb" networks: - wordpress_network wordpress-latest-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-latest env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 FONTAWESOME_ENV: development COMPOSER: ${WP_FA_DIR}/composer.json container_name: "com.fontawesome.wordpress-latest-dev" networks: - wordpress_network wordpress-php8.1-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-php8.1 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 FONTAWESOME_ENV: development COMPOSER: ${WP_FA_DIR}/composer-php8.1.json container_name: "com.fontawesome.wordpress-php8.1-dev" networks: - wordpress_network wordpress-php8.0-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-php8.0 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 COMPOSER: ${WP_FA_DIR}/composer-php8.0.json container_name: "com.fontawesome.wordpress-php8.0-dev" networks: - wordpress_network wordpress-php7.4-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-php7.4 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 COMPOSER: ${WP_FA_DIR}/composer-php7.4.json container_name: "com.fontawesome.wordpress-php7.4-dev" networks: - wordpress_network wordpress-php8.3-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-php8.3 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 COMPOSER: ${WP_FA_DIR}/composer-php8.3.json container_name: "com.fontawesome.wordpress-php8.3-dev" networks: - wordpress_network wordpress-latest-integration: <<: - *wordpress_defaults - *integration_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-latest env_file: - ".env" - ".env.local" environment: FONTAWESOME_ENV: production WORDPRESS_DB_HOST: wpdb:3306 container_name: "com.fontawesome.wordpress-latest-integration" networks: - wordpress_network wordpress-5.8-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-5.8 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 COMPOSER: ${WP_FA_DIR}/composer-wp5.8.json container_name: "com.fontawesome.wordpress-5.8-dev" networks: - wordpress_network wordpress-6.0-dev: <<: - *wordpress_defaults - *dev_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-6.0 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 COMPOSER: ${WP_FA_DIR}/composer-wp6.0.json container_name: "com.fontawesome.wordpress-6.0-dev" networks: - wordpress_network wordpress-6.0-integration: <<: - *wordpress_defaults - *integration_env_volumes depends_on: - wpdb image: wordpress-fontawesome-dev-6.0 env_file: - ".env" - ".env.local" environment: WORDPRESS_DB_HOST: wpdb:3306 COMPOSER: ${WP_FA_DIR}/composer-wp6.0.json container_name: "com.fontawesome.wordpress-6.0-integration" networks: - wordpress_network volumes: wpdb_data: name: wpdb_data_local_dev