fix: Properly set port variables in .env for docker compose port mapping
This commit is contained in:
16
setup.sh
16
setup.sh
@@ -106,15 +106,17 @@ echo -e "${YELLOW}→ Configuring environment...${NC}"
|
||||
if [ -f "src/.env.${DB}" ]; then
|
||||
cp "src/.env.${DB}" "src/.env"
|
||||
|
||||
# Append port configurations to .env (for reference only, not used by Laravel)
|
||||
# Note: DB_PORT is NOT appended - Laravel uses internal Docker port (3306/5432)
|
||||
# These are for docker compose external port mapping only
|
||||
# Append port configurations to .env for docker compose
|
||||
# These override default ports when conflicts are detected
|
||||
echo "" >> src/.env
|
||||
echo "# Port Configuration (auto-assigned by setup)" >> src/.env
|
||||
echo "# APP_PORT=$APP_PORT" >> src/.env
|
||||
echo "# MAIL_DASHBOARD_PORT=$MAIL_DASHBOARD_PORT" >> src/.env
|
||||
echo "# MAIL_PORT=$MAIL_PORT" >> src/.env
|
||||
echo "# REDIS_PORT=$REDIS_PORT" >> src/.env
|
||||
echo "APP_PORT=$APP_PORT" >> src/.env
|
||||
echo "MAIL_DASHBOARD_PORT=$MAIL_DASHBOARD_PORT" >> src/.env
|
||||
echo "MAIL_PORT=$MAIL_PORT" >> src/.env
|
||||
echo "REDIS_PORT=$REDIS_PORT" >> src/.env
|
||||
if [ -n "$DB_PORT" ]; then
|
||||
echo "DB_PORT=$DB_PORT" >> src/.env
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✓ Environment configured for ${DB}${NC}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user