Use env vars for ports, add .env.TEST

- WIZARD_PORT, MYSQL_PORT, BACKEND_PORT, FRONTEND_PORT env vars
- .env.TEST with default values (8080, 3306, 8000, 3000)
- Scripts load .env.TEST automatically
- LISTEN_ADDR uses env vars
- Ports bound to 127.0.0.1 for security
This commit is contained in:
Zhi
2026-03-14 08:20:55 +00:00
parent 392e050caa
commit 03067ca3a8
5 changed files with 60 additions and 22 deletions

View File

@@ -8,6 +8,14 @@ set -e
EXPOSE_PORT="off"
COMPOSE_FILE="docker-compose-frontend.yml"
# Load environment variables from .env.TEST if exists
if [ -f ".env.TEST" ]; then
echo "📋 Loading .env.TEST..."
set -a
source .env.TEST
set +a
fi
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in