1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00
This commit is contained in:
Klorydryk 2018-10-11 22:17:43 +00:00 committed by GitHub
commit 25b14ac705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -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.

View file

@ -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 \

View file

@ -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