-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·27 lines (22 loc) · 1.11 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·27 lines (22 loc) · 1.11 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
#!/bin/bash
# setup.sh - FocusFlow Initialization Script
echo "🌊 Initializing FocusFlow Ecosystem..."
# Create necessary directories
mkdir -p data
mkdir -p assets/audio
# Fetch placeholder royalty-free audio files if they don't exist
# We use tiny 1-second silent mp3s or short beeps just to satisfy the HTML5 Audio API for boilerplate
# Users are instructed to replace these with actual tracks
echo "🎵 Setting up audio assets..."
for track in "lofi.mp3" "rain.mp3" "forest.mp3"; do
if [ ! -f "assets/audio/$track" ]; then
echo "⬇️ Downloading placeholder for $track..."
# Downloading a valid sample mp3 to ensure HTML5 Audio API works
curl -sL "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" -o "assets/audio/$track" || echo "Warning: Could not download $track"
fi
done
echo "🗄️ Initializing SQLite Database layer..."
# The FastAPI lifespan event handles SQLite DB initialization automatically on startup
# We just need to ensure the data folder exists with correct permissions
chmod 777 data
echo "✅ Setup Complete. You can now run 'docker compose up --build -d'."