forked from PnX-SI/GeoPaysages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_app.sh
executable file
·41 lines (29 loc) · 1.5 KB
/
install_app.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
34
35
36
37
38
39
40
41
if [ "$(id -u)" == "0" ]; then
echo -e "\e[91m\e[1mThis script should NOT be run as root but your user needs sudo rights\e[0m" >&2
exit 1
fi
. install_configuration/settings.ini
echo "Stopping application..."
sudo /etc/init.d/supervisor stop $app_name
echo "Creating and activating Virtual env..."
python3 -m venv venv
. venv/bin/activate
mkdir -p ../data/images
mkdir -p ../data/notice-photo
echo "Installing requirements..."
pip install wheel
pip install -r ./backend/requirements.txt
cp backend/static/custom/images/sample.png.sample backend/static/custom/images/sample.png
cp backend/static/custom/css/custom-style.css.sample backend/static/custom/css/custom-style.css
cp backend/static/custom/css/page-sample.css.sample backend/static/custom/css/page-sample.css
cp backend/static/custom/logo/logo_txt_blanc.png.sample backend/static/custom/logo/logo_txt_blanc.png
cp backend/static/custom/logo/logo_txt_color.png.sample backend/static/custom/logo/logo_txt_color.png
cp backend/static/custom/logo/favicon.ico.sample backend/static/custom/logo/favicon.ico
cp backend/i18n/messages.pot.sample backend/i18n/messages.pot
cp backend/i18n/fr/LC_MESSAGES/messages.mo.sample backend/i18n/fr/LC_MESSAGES/messages.mo
cp backend/i18n/fr/LC_MESSAGES/messages.po.sample backend/i18n/fr/LC_MESSAGES/messages.po
cp ./backend/static/assets/images/oppv-005-03-2014.jpg ../data/images/
cp ./backend/static/assets/images/oppv-005-00-2006.jpg ../data/images/
pybabel compile -d backend/i18n
sudo supervisorctl reload
deactivate