diff --git a/environment_docker/README.md b/environment_docker/README.md index d0d8edd..159bea1 100644 --- a/environment_docker/README.md +++ b/environment_docker/README.md @@ -24,7 +24,10 @@ Name: webarena-with-configurable-map-backend ID: ami-08a862bf98e3bd7aa ``` -1. Create a security group that allows all inbound traffic. +1. Create a security group that allows all inbound traffic, or at minimum, create a security group with the following inbound rules: + - SSH (port 22) from your IP + - HTTP (port 80) from anywhere (0.0.0.0/0) + - Custom TCP ports: 3000, 7770, 7780, 8023, 8888, 9999 from anywhere (0.0.0.0/0) 2. Create an instance (recommended type: t3a.xlarge, 1000GB EBS root volume) from the webarena AMI. Use the security group just created and remember to select SSH key-pair. @@ -49,6 +52,16 @@ docker compose start :clock1: wait ~1 min to wait all services to start +**If services are not accessible externally**, run these iptables rules: +```bash +sudo iptables -t nat -A PREROUTING -p tcp --dport 7770 -j REDIRECT --to-port 7770 +sudo iptables -t nat -A PREROUTING -p tcp --dport 7780 -j REDIRECT --to-port 7780 +sudo iptables -t nat -A PREROUTING -p tcp --dport 3000 -j REDIRECT --to-port 3000 +sudo iptables -t nat -A PREROUTING -p tcp --dport 8888 -j REDIRECT --to-port 8888 +sudo iptables -t nat -A PREROUTING -p tcp --dport 9999 -j REDIRECT --to-port 9999 +sudo iptables -t nat -A PREROUTING -p tcp --dport 8023 -j REDIRECT --to-port 8023 +``` + 6. Run ```bash docker exec shopping /var/www/magento2/bin/magento setup:store-config:set --base-url="http://:7770" # no trailing / @@ -66,6 +79,25 @@ docker exec gitlab sed -i "s|^external_url.*|external_url 'http://