-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprestart.sh
More file actions
32 lines (24 loc) · 717 Bytes
/
prestart.sh
File metadata and controls
32 lines (24 loc) · 717 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
26
27
28
29
30
31
32
#!/bin/sh
set -e
echo "Waiting for database..."
until PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -c '\q'; do
sleep 5
done
echo "Create directories"
python3 generators/dirmaker.py
echo "Apply database migration"
python3 src/manage.py migrate --noinput
echo "Make captcha"
python3 src/manage.py makecaptchas 1024
echo "Build frontend"
./build_frontend.sh
if [ $FAKE_CONTENT = "True" ]; then
echo "Generate fake content (optional)"
python3 generators/imagemaker.py .
python3 generators/partymaker.py
python3 src/manage.py loaddata boards threads posts images
fi
if [ $DEBUG != "True" ]; then
echo "Collect static (optional)"
python3 src/manage.py collectstatic --noinput
fi