/
start.sh
33 lines (29 loc) · 924 Bytes
/
start.sh
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
#!/bin/bash
echo "Creating /test directories..."
for sub in \
/test/id \
/test/staging \
/test/archive \
/test/rfc \
/test/media \
/test/wiki/ietf \
; do
if [ ! -d "$sub" ]; then
echo "Creating dir $sub"
mkdir -p "$sub";
fi
done
echo "Fixing permissions..."
chmod -R 777 ./
echo "Ensure all requirements.txt packages are installed..."
pip --disable-pip-version-check --no-cache-dir install -r requirements.txt
echo "Creating data directories..."
chmod +x ./app-create-dirs.sh
./app-create-dirs.sh
echo "Running Datatracker checks..."
./ietf/manage.py check
# Migrate, adjusting to what the current state of the underlying database might be:
echo "Running Datatracker migrations..."
/usr/local/bin/python ./ietf/manage.py migrate --fake-initial --settings=settings_local
echo "Starting Datatracker..."
./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local