-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathsetup-env.sh
More file actions
executable file
·39 lines (32 loc) · 1.38 KB
/
setup-env.sh
File metadata and controls
executable file
·39 lines (32 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}🔧 Setting up BubbleLab environment files...${NC}\n"
# Function to copy env file if it doesn't exist
setup_env() {
local dir=$1
local app_name=$2
if [ -f "$dir/.env" ]; then
echo -e "${YELLOW}⚠️ $app_name: .env already exists, skipping...${NC}"
elif [ -f "$dir/.env.example" ]; then
cp "$dir/.env.example" "$dir/.env"
echo -e "${GREEN}✅ $app_name: Created .env from .env.example${NC}"
else
echo -e "${YELLOW}⚠️ $app_name: No .env.example found, skipping...${NC}"
fi
}
# Setup frontend env
setup_env "apps/bubble-studio" "Frontend (bubble-studio)"
# Setup backend env
setup_env "apps/bubblelab-api" "Backend (bubblelab-api)"
echo -e "\n${GREEN}✨ Environment setup complete!${NC}"
echo -e "\n${BLUE}📝 Next steps:${NC}"
echo -e "1. Edit ${YELLOW}apps/bubble-studio/.env${NC} if needed"
echo -e "2. Edit ${YELLOW}apps/bubblelab-api/.env${NC} if needed"
echo -e "3. Run ${YELLOW}pnpm install${NC} to install dependencies"
echo -e "4. Start the backend: ${YELLOW}cd apps/bubblelab-api && pnpm run dev${NC}"
echo -e "5. Start the frontend: ${YELLOW}cd apps/bubble-studio && pnpm run dev${NC}"
echo -e "\n${BLUE}💡 Tip: By default, the .env.example files are configured for dev mode (no auth required)${NC}\n"