Sfoglia il codice sorgente

Fixed additional issue of waiting for Elasticsearch/RabbitMQ connection on Mac #442

Mark Shust 3 anni fa
parent
commit
b6520d4f42
3 ha cambiato i file con 16 aggiunte e 8 eliminazioni
  1. 5 0
      CHANGELOG.md
  2. 9 0
      compose/bin/setup
  3. 2 8
      compose/docker-compose.yml

+ 5 - 0
CHANGELOG.md

@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 - PHP image `8.0-fpm-develop` now available for testing purposes.
 
+## [41.0.1] - 2021-11-09
+
+### Fixed
+- Fixed additional issue of waiting for Elasticsearch/RabbitMQ connection on Mac [#442](https://github.com/markshust/docker-magento/issues/442).
+
 ## [41.0.0] - 2021-11-08
 
 There has been an ongoing issue with Docker for Mac + M1 chips (Apple Silicon) which causes a 5-second delay in network requests (see [#5626](https://github.com/docker/for-mac/issues/5626)). A fix has been implemented in this release that works around this issue, adding `extra_hosts` directives in the `docker-compose.yml` file. This update should be backwards-compatible, but will break existing setups that use custom Docker networks (this is an uncommon scenario). See notes at the top of `docker-compose.yml` for how to configure this project for custom Docker networks.

+ 9 - 0
compose/bin/setup

@@ -26,6 +26,15 @@ bin/clinotty timeout 100 bash -c "
     done"
 [ $? != 0 ] && echo "Failed to connect to Elasticsearch" && exit
 
+echo ""
+echo "Waiting for connection to RabbitMQ..."
+rabbitmqi=4
+until [ $rabbitmqi -le 0 ]; do
+    printf '.'
+    let rabbitmqi--
+    sleep 2
+done
+
 bin/clinotty bin/magento setup:install \
   --db-host="$MYSQL_HOST" \
   --db-name="$MYSQL_DATABASE" \

+ 2 - 8
compose/docker-compose.yml

@@ -1,7 +1,7 @@
 ## Mark Shust's Docker Configuration for Magento
 ## (https://github.com/markshust/docker-magento)
 ##
-## Version 41.0.0
+## Version 41.0.1
 
 ## To use SSH, see https://github.com/markshust/docker-magento#ssh
 ## Linux users, see https://github.com/markshust/docker-magento#linux
@@ -18,9 +18,6 @@ services:
     ports:
       - "80:8000"
       - "443:8443"
-    links:
-      - db
-      - phpfpm
     volumes: &appvolumes
       - ~/.composer:/var/www/.composer:cached
       - ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached
@@ -35,13 +32,12 @@ services:
       - "db:172.17.0.1"
       - "redis:172.17.0.1"
       - "elasticsearch:172.17.0.1"
+      - "rabbitmq:172.17.0.1"
       ## Selenium support, replace "magento.test" with URL of your site
       - "magento.test:172.17.0.1"
 
   phpfpm:
     image: markoshust/magento-php:7.4-fpm-11
-    links:
-      - db
     volumes: *appvolumes
     extra_hosts: *appextrahosts
 
@@ -98,8 +94,6 @@ services:
   #  image: selenium/standalone-chrome-debug:3.8.1
   #  ports:
   #    - "5900:5900"
-  #  links:
-  #    - app
   #  extra_hosts: *appextrahosts
 
 volumes: