fix: Write port config to project root .env for docker compose
This commit is contained in:
16
setup.sh
16
setup.sh
@@ -106,16 +106,14 @@ echo -e "${YELLOW}→ Configuring environment...${NC}"
|
|||||||
if [ -f "src/.env.${DB}" ]; then
|
if [ -f "src/.env.${DB}" ]; then
|
||||||
cp "src/.env.${DB}" "src/.env"
|
cp "src/.env.${DB}" "src/.env"
|
||||||
|
|
||||||
# Append port configurations to .env for docker compose
|
# Create .env in project root for docker compose port mapping
|
||||||
# These override default ports when conflicts are detected
|
echo "# Docker Compose Port Configuration (auto-assigned by setup)" > .env
|
||||||
echo "" >> src/.env
|
echo "APP_PORT=$APP_PORT" >> .env
|
||||||
echo "# Port Configuration (auto-assigned by setup)" >> src/.env
|
echo "MAIL_DASHBOARD_PORT=$MAIL_DASHBOARD_PORT" >> .env
|
||||||
echo "APP_PORT=$APP_PORT" >> src/.env
|
echo "MAIL_PORT=$MAIL_PORT" >> .env
|
||||||
echo "MAIL_DASHBOARD_PORT=$MAIL_DASHBOARD_PORT" >> src/.env
|
echo "REDIS_PORT=$REDIS_PORT" >> .env
|
||||||
echo "MAIL_PORT=$MAIL_PORT" >> src/.env
|
|
||||||
echo "REDIS_PORT=$REDIS_PORT" >> src/.env
|
|
||||||
if [ -n "$DB_PORT" ]; then
|
if [ -n "$DB_PORT" ]; then
|
||||||
echo "DB_PORT=$DB_PORT" >> src/.env
|
echo "DB_PORT=$DB_PORT" >> .env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}✓ Environment configured for ${DB}${NC}"
|
echo -e "${GREEN}✓ Environment configured for ${DB}${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user