-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·36 lines (26 loc) · 789 Bytes
/
setup.sh
File metadata and controls
executable file
·36 lines (26 loc) · 789 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
#!/usr/bin/env bash
set -ueo pipefail
SCRIPT_DIR=$(dirname "$(realpath -s "$0")")
BACKEND_DIR="$SCRIPT_DIR/backend"
FRONTEND_DIR="$SCRIPT_DIR/frontend"
#===================================#
# BACKEND SETUP #
#===================================#
VENV_DIR="env"
VENV_BIN="$VENV_DIR/bin/activate"
cd "$BACKEND_DIR"
python3 -m virtualenv "$VENV_DIR"
# shellcheck source=backend/env/bin/activate
source "$VENV_BIN"
pip install -r "requirements.txt"
deactivate
echo -e "\n[+] Backend has been configured successfully\n"
#===================================#
# FRONTEND SETUP #
#===================================#
cd "$FRONTEND_DIR"
yarn install
yarn run build
echo -e "\n[+] Frontend has been configured successfully\n"
# Exit
cd "$SCRIPT_DIR"