Skip to content

Commit

Permalink
Fix RabbitMQ connection issues on Windows #426
Browse files Browse the repository at this point in the history
  • Loading branch information
markshust committed Dec 20, 2021
1 parent 790e2fe commit 7f2cbce
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
13 changes: 8 additions & 5 deletions compose/bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ source env/db.env
source env/elasticsearch.env
# shellcheck source=../env/magento.env
source env/magento.env
# shellcheck source=../env/rabbitmq.env
source env/rabbitmq.env


DOMAIN=${1:-magento.test}

Expand Down Expand Up @@ -51,11 +54,11 @@ bin/clinotty bin/magento setup:install \
--language="$MAGENTO_LOCALE" \
--currency="$MAGENTO_CURRENCY" \
--timezone="$MAGENTO_TIMEZONE" \
--amqp-host=rabbitmq \
--amqp-port=5672 \
--amqp-user=guest \
--amqp-password=guest \
--amqp-virtualhost=/ \
--amqp-host="$RABBITMQ_HOST" \
--amqp-port="$RABBITMQ_PORT" \
--amqp-user="$RABBITMQ_DEFAULT_USER" \
--amqp-password="$RABBITMQ_DEFAULT_PASS" \
--amqp-virtualhost="$RABBITMQ_DEFAULT_VHOST" \
--cache-backend=redis \
--cache-backend-redis-server=redis \
--cache-backend-redis-db=0 \
Expand Down
12 changes: 2 additions & 10 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,7 @@ services:
ports:
- "9200:9200"
- "9300:9300"
environment:
- "discovery.type=single-node"
## Set custom heap size to avoid memory errors
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
## Avoid test failures due to small disks
## More info at https://github.com/markshust/docker-magento/issues/488
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "index.blocks.read_only_allow_delete"
env_file: env/elasticsearch.env
extra_hosts: *appextrahosts

rabbitmq:
Expand All @@ -80,8 +73,7 @@ services:
- "5672:5672"
volumes:
- rabbitmqdata:/var/lib/rabbitmq
environment:
- RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1GB
env_file: env/rabbitmq.env
extra_hosts: *appextrahosts

mailcatcher:
Expand Down
10 changes: 10 additions & 0 deletions compose/env/elasticsearch.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
ES_HOST=elasticsearch
ES_PORT=9200

discovery.type=single-node

# Set custom heap size to avoid memory errors
ES_JAVA_OPTS=-Xms1g -Xmx1g

# Avoid test failures due to small disks
# More info at https://github.com/markshust/docker-magento/issues/488
cluster.routing.allocation.disk.threshold_enabled=false
index.blocks.read_only_allow_delete
6 changes: 6 additions & 0 deletions compose/env/rabbitmq.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
RABBITMQ_DEFAULT_USER=magento
RABBITMQ_DEFAULT_PASS=magento
RABBITMQ_DEFAULT_VHOST=/
RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1GB

0 comments on commit 7f2cbce

Please sign in to comment.