1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libretranslate_ynh.git synced 2024-09-03 19:36:00 +02:00
This commit is contained in:
ericgaspar 2021-09-02 19:05:25 +02:00
parent 900685cc27
commit 461da2b8d5
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 5 additions and 12 deletions

View file

@ -1,5 +1,4 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location / {
location __PATH__/ {
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;

View file

@ -9,7 +9,7 @@ Group=__APP__
Restart=always Restart=always
Type=simple Type=simple
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
ExecStart=/usr/local/bin/pipenv run python3 __FINALPATH__/.venv/bin/libretranslate --host 127.0.0.1 --port __PORT__ ExecStart=/usr/local/bin/pipenv run python3 __FINALPATH__/.venv/bin/libretranslate --host 127.0.0.1 --port __PORT__ --load-only en,fr --frontend-language-target en
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -34,12 +34,6 @@
"type": "domain", "type": "domain",
"example": "example.com" "example": "example.com"
}, },
{
"name": "path",
"type": "path",
"example": "/libretranslate",
"default": "/libretranslate"
},
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",

View file

@ -24,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
@ -32,7 +32,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade

View file

@ -25,7 +25,7 @@ ynh_abort_if_errors
#================================================= #=================================================
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME