Skip to content

Commit

Permalink
Safer host name
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Nov 20, 2024
1 parent 4aa9675 commit 47c4457
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/project/app_classic/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ tasks:
- |
if [ "{{OS}}" = "windows" ]; then
HOST_IP=$(powershell -command "Get-NetIpAddress | where { \$_.InterfaceAlias -Like '*WSL*' -and \$_.AddressFamily -EQ 'IPv4' } | select -ExpandProperty IPAddress")
echo "EXTRA_HOST=host.containers.internal:$HOST_IP" > .env
echo "EXTRA_HOST=host.docker.internal:$HOST_IP" > .env
else
echo "EXTRA_HOST=localhost.dummy:127.0.0.1" > .env
fi
Expand Down
2 changes: 1 addition & 1 deletion pkg/project/app_classic/dispatcher/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ services:
# See: https://documentation.suse.com/smart/container/html/rootless-podman/index.html#rootless-podman-configure-port-below-1024
net.ipv4.ip_unprivileged_port_start: 0
extra_hosts:
# Fixes: "Sleeping for 5s to wait until port 4503 on host.containers.internal is available"
# Fixes: "Sleeping for 5s to wait until port 4503 on host.docker.internal is available"
# See: https://stackoverflow.com/questions/79098571/podman-container-cannot-connect-to-windows-host
- "${EXTRA_HOST}"
2 changes: 1 addition & 1 deletion pkg/project/app_cloud/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ tasks:
- |
if [ "{{OS}}" = "windows" ]; then
HOST_IP=$(powershell -command "Get-NetIpAddress | where { \$_.InterfaceAlias -Like '*WSL*' -and \$_.AddressFamily -EQ 'IPv4' } | select -ExpandProperty IPAddress")
echo "EXTRA_HOST=host.containers.internal:$HOST_IP" > .env
echo "EXTRA_HOST=host.docker.internal:$HOST_IP" > .env
else
echo "EXTRA_HOST=localhost.dummy:127.0.0.1" > .env
fi
Expand Down
4 changes: 2 additions & 2 deletions pkg/project/app_cloud/dispatcher/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
ports:
- "80:80"
environment:
- AEM_HOST=host.containers.internal
- AEM_HOST=host.docker.internal
- AEM_IP=*.*.*.*
- AEM_PORT=4503
- DISP_LOG_LEVEL=Warn
Expand All @@ -25,6 +25,6 @@ services:
# See: https://documentation.suse.com/smart/container/html/rootless-podman/index.html#rootless-podman-configure-port-below-1024
net.ipv4.ip_unprivileged_port_start: 0
extra_hosts:
# Fixes: "Sleeping for 5s to wait until port 4503 on host.containers.internal is available"
# Fixes: "Sleeping for 5s to wait until port 4503 on host.docker.internal is available"
# See: https://stackoverflow.com/questions/79098571/podman-container-cannot-connect-to-windows-host
- "${EXTRA_HOST}"

0 comments on commit 47c4457

Please sign in to comment.