mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Removed location hierarchy, and use __NAME__ instead of __APP__ so ynh nginx help works as expected
This commit is contained in:
parent
fb93b9c758
commit
1ce33422cf
4 changed files with 32 additions and 32 deletions
|
@ -3,37 +3,37 @@ location __PATH__ {
|
|||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
location __PATH__/favicon.ico {
|
||||
# DATA_DIR/static/favicon.ico
|
||||
alias __FINALPATH__/static/favicon.ico;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location __PATH__/robots.txt {
|
||||
# DATA_DIR/static/robots.txt
|
||||
alias __FINALPATH__/static/robots.txt;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location __PATH__/static {
|
||||
# DATA_DIR/static/
|
||||
alias __FINALPATH__/static/;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location __PATH__/media {
|
||||
# DATA_DIR/media/
|
||||
alias __FINALPATH__/media/;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
include uwsgi_params;
|
||||
# Needed for long running operations in admin interface
|
||||
uwsgi_read_timeout 3600;
|
||||
# Adjust based to uwsgi configuration:
|
||||
uwsgi_pass unix:///opt/__APP__/uwsgi.sock
|
||||
uwsgi_pass unix:///opt/__NAME__/uwsgi.sock
|
||||
# uwsgi_pass 127.0.0.1:8080;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
location __PATH__/favicon.ico {
|
||||
# DATA_DIR/static/favicon.ico
|
||||
alias __FINALPATH__/static/favicon.ico;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location __PATH__/robots.txt {
|
||||
# DATA_DIR/static/robots.txt
|
||||
alias __FINALPATH__/static/robots.txt;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location __PATH__/static {
|
||||
# DATA_DIR/static/
|
||||
alias __FINALPATH__/static/;
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location __PATH__/media {
|
||||
# DATA_DIR/media/
|
||||
alias __FINALPATH__/media/;
|
||||
expires 30d;
|
||||
}
|
||||
|
|
|
@ -40,9 +40,9 @@ DATABASES = {
|
|||
# Database engine
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
# Database name
|
||||
'NAME': '__APP__',
|
||||
'NAME': '__NAME__',
|
||||
# Database user
|
||||
'USER': '__APP__',
|
||||
'USER': '__NAME__',
|
||||
# Database password
|
||||
'PASSWORD': '__DB_PWD__',
|
||||
# Set to empty string for localhost
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[uwsgi]
|
||||
uid = __APP__
|
||||
uid = __NAME__
|
||||
gid = users
|
||||
|
||||
protocol = uwsgi
|
||||
|
@ -22,10 +22,10 @@ master = true
|
|||
# maximum number of worker processes
|
||||
processes = 4
|
||||
# the socket (use the full path to be safe
|
||||
socket = /opt/__APP__/uwsgi.sock
|
||||
socket = /opt/__NAME__/uwsgi.sock
|
||||
# ... with appropriate permissions - may be needed
|
||||
chmod-socket = 666
|
||||
stats = /opt/__APP__/stats.sock
|
||||
stats = /opt/__NAME__/stats.sock
|
||||
# clear environment on exit
|
||||
vacuum = true
|
||||
plugins = python3
|
||||
|
|
|
@ -118,7 +118,7 @@ ynh_system_user_create $app
|
|||
|
||||
# Copy Files
|
||||
sudo cp ../conf/uwsgi.ini $final_path/uwsgi.ini
|
||||
ynh_replace_string "__APP__" "$app" $final_path/uwsgi.ini
|
||||
ynh_replace_string "__NAME__" "$app" $final_path/uwsgi.ini
|
||||
ynh_replace_string "__FINALPATH__" "$finalpath" $final_path/uwsgi.ini
|
||||
|
||||
# Config service
|
||||
|
@ -144,7 +144,7 @@ key=$(ynh_string_random 64)
|
|||
sudo cp $final_path/weblate/settings_example.py $final_path/weblate/settings.py
|
||||
sudo cp ../conf/settings.py $final_path/weblate/settings.py
|
||||
|
||||
ynh_replace_string "__APP__" "$app" $final_path/settings.py
|
||||
ynh_replace_string "__NAME__" "$app" $final_path/settings.py
|
||||
ynh_replace_string "__DB_PWD__" "$db_pwd" $final_path/weblate/settings.py
|
||||
ynh_replace_string "__ADMIN__" "$admin" $final_path/weblate/settings.py
|
||||
ynh_replace_string "__ADMINMAIL__" "$admin_mail" $final_path/weblate/settings.py
|
||||
|
|
Loading…
Reference in a new issue