-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·47 lines (38 loc) · 898 Bytes
/
setup.sh
File metadata and controls
executable file
·47 lines (38 loc) · 898 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/bash
# Source this.
# Setup virtualenv
#mkdir -p data
if [ ! -d venv ]
then
python3 -m venv venv
chmod +x venv/bin/activate
chown -R vscode:vscode venv
fi
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
# TODO create a db script that can use the docker init builder
# Check out tools/erase_mysql_db_and_use_real_data.sh
# Set up config files
FILE=${PWD}/api/secret_key
if [ ! -f "$FILE" ]; then
echo "Generating secret key"
head /dev/urandom | tr -dc A-Za-z0-9 | head -c 14 > $FILE
fi
# Make sure api/settings.py is present
FILE=${PWD}/api/settings.py
if test -f "$FILE"; then
echo "$FILE exists"
else
touch $FILE
echo "$FILE created"
fi
echo "Remember to edit your mail settings in $FILE"
# To deactivate the venv, use
#
# $ deactivate
#
# as a command on the command line.
# To set up the venv again, then type
#
# $ source setup.sh