mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Merge 2b9fd12b11
into 98cad80c80
This commit is contained in:
commit
25b14ac705
3 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
location PATHTOCHANGE/static/ {
|
||||
alias /opt/yunohost/ihatemoney/venv/lib/python3.4/site-packages/ihatemoney/static/;
|
||||
alias APPHOME/static/;
|
||||
}
|
||||
location PATHTOCHANGE {
|
||||
# Force https.
|
||||
|
|
|
@ -41,8 +41,10 @@ init_virtualenv () {
|
|||
configure_nginx () {
|
||||
local domain=$1
|
||||
local path=$2
|
||||
local app_home=$3
|
||||
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
sed -i "s@APPHOME@$app_home@g" ../conf/nginx.conf
|
||||
# Fix double-slash for domain-root install
|
||||
sed -i "s@location //@location /@" ../conf/nginx.conf
|
||||
sudo install -o root -g root -m644 \
|
||||
|
|
|
@ -62,11 +62,13 @@ create_unix_user
|
|||
|
||||
# Prepare venv
|
||||
init_virtualenv
|
||||
sudo /opt/yunohost/ihatemoney/venv/bin/pip install 'pip<10'
|
||||
sudo /opt/yunohost/ihatemoney/venv/bin/pip install \
|
||||
'gunicorn>=19.3.0' \
|
||||
'PyMySQL>=0.9,<0.10' \
|
||||
'ihatemoney>=2,<3' \
|
||||
|
||||
app_home=$(dirname $(find /opt/yunohost/ihatemoney/venv/lib/ -type d -name static | head -n1))
|
||||
create_system_dirs
|
||||
|
||||
# Configure gunicorn
|
||||
|
@ -97,7 +99,7 @@ then
|
|||
fi
|
||||
|
||||
# Configure Nginx
|
||||
configure_nginx "$domain" "$path"
|
||||
configure_nginx "$domain" "$path" "$app_home"
|
||||
|
||||
# Start backend
|
||||
sudo systemctl start supervisor
|
||||
|
|
Loading…
Add table
Reference in a new issue