1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searxng_ynh.git synced 2024-09-03 20:26:00 +02:00

Add missing uwsgi.ini file

This commit is contained in:
mh4ckt3mh4ckt1c4s 2022-11-23 17:20:15 +01:00
parent 9fd37ce39c
commit b95c884a82
2 changed files with 10 additions and 7 deletions

View file

@ -1,7 +1,7 @@
[uwsgi]
# Who will run the code
uid = __APP__
gid = __APP__
uid = searxng
gid = searxng
# Number of workers
workers = 4
@ -17,18 +17,18 @@ lazy-apps = true
enable-threads = true
# Application base folder
base = __FINALPATH__
base = /opt/yunohost/searxng
# Support running the module from a webserver subdirectory.
route-run = fixpathinfo:
# Module to import
module = __APP__.webapp
module = searxng.webapp
# Virtualenv and python path
virtualenv = __FINALPATH__
pythonpath = __FINALPATH__
chdir = __FINALPATH__/searx/
virtualenv = /opt/yunohost/searxng
pythonpath = /opt/yunohost/searxng
chdir = /opt/yunohost/searxng/searx/
# The variable holding flask application
callable = app

View file

@ -149,11 +149,14 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
secret_key=$(ynh_string_random)
ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
ynh_add_config --template="../conf/uwsgi.ini" --destination="/etc/uwsgi/apps-available/$app.ini"
# FIXME: this should be handled by the core in the future
# You may need to use chmod 600 instead of 400,
# for example if the app is expected to be able to modify its own config
chmod 400 "$final_path/searx/settings.yml"
chown $app:$app "$final_path/searx/settings.yml"
chmod 400 "/etc/uwsgi/apps-available/$app.ini"
chown $app:$app "/etc/uwsgi/apps-available/$app.ini"
### For more complex cases where you want to replace stuff using regexes,
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)