-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
Β·41 lines (33 loc) Β· 1.21 KB
/
Copy pathinit.sh
File metadata and controls
executable file
Β·41 lines (33 loc) Β· 1.21 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
40
41
#!/bin/bash
# Initialize the peer evaluation system
# This script creates the teacher superuser and performs initial setup
set -e
echo "π Initializing Peer Evaluation System..."
# Check if containers are running
if ! docker compose ps | grep -q "web.*Up"; then
echo "β Web container is not running. Please start the application first:"
echo " docker compose up -d"
exit 1
fi
# Run migrations
echo "ποΈ Running database migrations..."
docker compose exec web python manage.py migrate
# Create teacher superuser
echo "π€ Creating teacher superuser..."
echo " Username will be: teacher"
echo " Please provide the following information:"
docker compose exec web python manage.py create_teacher_superuser
# Collect static files (if needed)
echo "π¦ Collecting static files..."
docker compose exec web python manage.py collectstatic --noinput
echo "β
Initialization completed successfully!"
echo ""
echo "π Login Information:"
echo " Username: teacher"
echo " Password: [the password you just set]"
echo ""
echo "π Access your application:"
echo " Local: http://localhost:8000"
echo " Admin: http://localhost:8000/admin/"
echo ""
echo "π Your peer evaluation system is ready to use!"