mirror of
https://github.com/YunoHost-Apps/coin_ynh.git
synced 2024-09-03 18:16:26 +02:00
Instal in /var/www
This commit is contained in:
parent
1677dcc0d2
commit
b74e4d8586
5 changed files with 12 additions and 12 deletions
|
@ -6,8 +6,8 @@ After=network.target
|
|||
PIDFile=/run/gunicorn/YNH_APP_INSTANCE_NAME-pid
|
||||
User=YNH_APP_INSTANCE_NAME
|
||||
Group=www-data
|
||||
WorkingDirectory=/opt/YNH_APP_INSTANCE_NAME
|
||||
ExecStart=/opt/YNH_APP_INSTANCE_NAME/venv/bin/gunicorn -c /opt/YNH_APP_INSTANCE_NAME/gunicorn_config.py YNH_APP_INSTANCE_NAME.wsgi
|
||||
WorkingDirectory=/var/www/YNH_APP_INSTANCE_NAME
|
||||
ExecStart=/var/www/YNH_APP_INSTANCE_NAME/venv/bin/gunicorn -c /var/www/YNH_APP_INSTANCE_NAME/gunicorn_config.py YNH_APP_INSTANCE_NAME.wsgi
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
ExecStop=/bin/kill -s TERM $MAINPID
|
||||
PrivateTmp=true
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
command = '/opt/__YNH_APP_INSTANCE_NAME__/venv/bin/gunicorn'
|
||||
pythonpath = '/opt/__YNH_APP_INSTANCE_NAME__'
|
||||
command = '/var/www/__YNH_APP_INSTANCE_NAME__/venv/bin/gunicorn'
|
||||
pythonpath = '/var/www/__YNH_APP_INSTANCE_NAME__'
|
||||
workers = 4
|
||||
user = '__YNH_APP_INSTANCE_NAME__'
|
||||
bind = 'unix:/opt/__YNH_APP_INSTANCE_NAME__/sock'
|
||||
bind = 'unix:/var/www/__YNH_APP_INSTANCE_NAME__/sock'
|
||||
pid = '/run/gunicorn/__YNH_APP_INSTANCE_NAME__-pid'
|
||||
errorlog = '/var/log/__YNH_APP_INSTANCE_NAME__/error.log'
|
||||
accesslog = '/var/log/__YNH_APP_INSTANCE_NAME__/access.log'
|
||||
|
|
|
@ -7,19 +7,19 @@ location __PATH__/ {
|
|||
}
|
||||
location __PATH__/protected/ {
|
||||
internal;
|
||||
alias /opt/__NAME__/__NAME__/smedia/;
|
||||
alias /var/www/__NAME__/__NAME__/smedia/;
|
||||
}
|
||||
|
||||
location __PATH__/media {
|
||||
alias /opt/__NAME__/media;
|
||||
alias /var/www/__NAME__/media;
|
||||
}
|
||||
|
||||
location __PATH__/static {
|
||||
alias /opt/__NAME__/static;
|
||||
alias /var/www/__NAME__/static;
|
||||
}
|
||||
|
||||
location __PATH__/assets {
|
||||
alias /opt/__NAME__/static;
|
||||
alias /var/www/__NAME__/static;
|
||||
}
|
||||
|
||||
location @__NAME__ {
|
||||
|
@ -27,5 +27,5 @@ location @__NAME__ {
|
|||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://unix:/opt/__NAME__/sock;
|
||||
proxy_pass http://unix:/var/www/__NAME__/sock;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ export secret=$(ynh_string_random 24)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..."
|
||||
|
||||
export final_path=/opt/$app
|
||||
export final_path=/var/www/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
# Register (book) web path
|
||||
|
|
|
@ -63,7 +63,7 @@ fi
|
|||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z "$final_path" ]; then
|
||||
final_path=/opt/$app
|
||||
final_path=/var/www/$app
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue