File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ if [ " $( uname) " == " Darwin" ]; then
4
+ echo " This script is designed for Linux and will not work properly on macOS."
5
+ else
6
+ # Get the IP address from the Docker container
7
+ docker_ip=$( docker run --rm alpine ip route | awk ' NR==1 {print $3}' )
8
+
9
+ # Check if the IP address already exists in /etc/hosts
10
+ if grep -q " $docker_ip host.docker.internal" /etc/hosts; then
11
+ echo " The entry already exists in /etc/hosts. No action needed."
12
+ else
13
+ # Add a new entry to /etc/hosts
14
+ echo " $docker_ip host.docker.internal" | sudo tee -a /etc/hosts
15
+ echo " A new entry in the /etc/hosts file has been created"
16
+ fi
17
+
18
+ # Ask the user whether to execute the iptables command
19
+ read -r -p " Do you want to open port 9003 for Xdebug? (y/n): " choice
20
+ if [ " $choice " == " y" ]; then
21
+ sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT
22
+ echo " Port 9003 has been opened for xdebug."
23
+ fi
24
+
25
+ echo " Tasks completed successfully"
26
+ fi
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ services:
66
66
# # More info at https://github.com/markshust/docker-magento/issues/488
67
67
- " cluster.routing.allocation.disk.threshold_enabled=false"
68
68
- " index.blocks.read_only_allow_delete"
69
+ # # Uncomment the following line to increase the virtual memory map count
70
+ # - "max_map_count=262144"
69
71
70
72
# # If you wish to use Elasticsearch, comment out opensearch image above and
71
73
# # uncomment this block. Do the same in the composer.healthcheck.yaml file.
@@ -84,6 +86,8 @@ services:
84
86
# ## More info at https://github.com/markshust/docker-magento/issues/488
85
87
# - "cluster.routing.allocation.disk.threshold_enabled=false"
86
88
# - "index.blocks.read_only_allow_delete"
89
+ # ## Uncomment the following line to increase the virtual memory map count
90
+ # - "max_map_count=262144"
87
91
88
92
rabbitmq :
89
93
image : markoshust/magento-rabbitmq:3.11-1
You can’t perform that action at this time.
0 commit comments