From 133e79c0b32a97c6d8cb7a9cf9115a14e8216f74 Mon Sep 17 00:00:00 2001 From: me Date: Tue, 5 May 2026 20:07:14 +0530 Subject: [PATCH] feat: configure e2e database and email host aliases for Gitea Actions environment --- scripts/run-e2e.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/run-e2e.sh b/scripts/run-e2e.sh index 45c31b7..c00ed5b 100755 --- a/scripts/run-e2e.sh +++ b/scripts/run-e2e.sh @@ -55,6 +55,18 @@ until $CONTAINER_BIN exec "$DB_NAME" pg_isready -U "${DB_USER:-test}" >/dev/null done export PIKU_ENV_FILE="$ENV_FILE" + +# NOTE: When running in Gitea Actions (within container), We must ponint DB and mail to the internal docker host instead. +if [ "$GITEA_ACTIONS" = "true" ]; then + sudo apt-get update && sudo apt-get install -y iproute2 + # Sample: "default via dev proto dhcp src metric 100" + HOST_IP=$(ip route show default | awk '/default/ {print $3}') + echo "Running on Gitea. Internal Docker host... $HOST_IP" + + export DB_HOST=$HOST_IP + export EMAIL_HOST=$HOST_IP +fi + echo "Starting Backend..." mkdir -p ./tmp/logs (