-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
25 lines (19 loc) · 713 Bytes
/
build.sh
File metadata and controls
25 lines (19 loc) · 713 Bytes
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
#!/bin/bash
# Build script for Render deployment
set -e
echo "Installing Python dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
echo "Creating data directories..."
mkdir -p /data/student_DB
mkdir -p /data
echo "Initializing JSON files if they don't exist..."
# Initialize users database
if [ ! -f /data/users_database.json ]; then
echo '{"users": []}' > /data/users_database.json
fi
# Initialize teacher-student relations (in DATA_DIR, not backend directory)
if [ ! -f /data/teacher_student_relations.json ]; then
echo '{"relations": [], "last_updated": "'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'"}' > /data/teacher_student_relations.json
fi
echo "Build completed successfully!"