1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00
This commit is contained in:
Éric Gaspar 2023-11-16 13:17:46 +01:00
parent 25b000cc64
commit 8cc306ec5d
5 changed files with 36 additions and 50 deletions

View file

@ -1,69 +1,35 @@
# This file is a "template" of what your parameters.yml file should look like
parameters:
# Uncomment these settings or manually update your parameters.yml
# to use docker-compose
#
# database_driver: %env.database_driver%
# database_host: %env.database_host%
# database_port: %env.database_port%
# database_name: %env.database_name%
# database_user: %env.database_user%
# database_password: %env.database_password%
database_driver: pdo_mysql
database_driver_class: ~
database_host: 127.0.0.1
database_port: ~
database_name: __DB_NAME__
database_user: __DB_USER__
database_password: __DB_PWD__
# For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite"
database_path: null
database_table_prefix: null
database_socket: null
# with PostgreSQL and SQLite, you must set "utf8"
database_path: ~
database_table_prefix: wallabag_
database_socket: ~
database_charset: utf8mb4
domain_name: https://__DOMAIN____PATH__
server_name: "Your wallabag instance"
#mailer_dsn: smtp://user:pass@__DOMAIN__:25
mailer_dsn: smtp://__APP__:__MAIL_PWD__@__DOMAIN__:25
locale: __LANGUAGE__
# A secret key that's used to generate certain security-related tokens
secret: __DESKEY__
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_registration: false
twofactor_sender: no-reply@__DOMAIN__
fosuser_registration: true
fosuser_confirmation: true
# how long the access token should live in seconds for the API
fos_oauth_server_access_token_lifetime: 3600
# how long the refresh token should life in seconds for the API
fos_oauth_server_refresh_token_lifetime: 1209600
from_email: no-reply@wallabag.org
from_email: no-reply@__DOMAIN__
rss_limit: 50
# RabbitMQ processing
rabbitmq_host: localhost
rabbitmq_port: 5672
rabbitmq_user: guest
rabbitmq_password: guest
rabbitmq_prefetch_count: 10
# Redis processing
redis_scheme: tcp
redis_host: localhost
redis_port: 6379
redis_path: null
redis_password: null
# sentry logging
redis_path: ~
redis_password: ~
sentry_dsn: ~
server_name: "__NAME__"

View file

@ -41,6 +41,10 @@ ram.runtime = "50M"
type = "group"
default = "visitors"
[install.language]
ask.en = "Choose the application language"
ask.fr = "Choisissez la langue de l'application"
@ -51,6 +55,13 @@ ram.runtime = "50M"
[install.admin]
type = "user"
[install.name]
ask.en = "Choose your wallabag instance name"
ask.fr = "Choisissez le nom de votre instance wallabag"
type = "string"
example = "Wallabag"
default = "Your wallabag instance"
[resources]
[resources.sources.main]
url = "https://github.com/wallabag/wallabag/releases/download/2.6.7/wallabag-2.6.7.tar.gz"

View file

@ -38,7 +38,7 @@ ynh_add_fpm_config
#=================================================
ynh_script_progression --message="Configuring wallabag..." --weight=25
ynh_add_config --template="../conf/parameters.yml" --destination="$install_dir/app/config/parameters.yml"
ynh_add_config --template="parameters.yml" --destination="$install_dir/app/config/parameters.yml"
# Alias for php-cli execution command
php_exec="ynh_exec_as $app php$phpversion "$install_dir/bin/console" --no-interaction --env=prod"

View file

@ -26,7 +26,13 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ -z "${language:-}" ]; then
language="en"
ynh_app_setting_set --app=$app --key=language --value=$language
#fi
fi
# If name doesn't exist, create it
if [ -z "${name:-}" ]; then
name="wallabag"
ynh_app_setting_set --app=$app --key=name --value=$name
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -75,20 +81,22 @@ ynh_use_logrotate --non-append
# CONFIGURE WALLABAG
#=================================================
# Alias for php-cli execution command
php_exec="ynh_exec_as $app php${YNH_PHP_VERSION} "$install_dir/bin/console" --no-interaction --env=prod"
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Reconfiguring wallabag..." --weight=1
# Copy and set Wallabag dist configuration
ynh_add_config --template="../conf/parameters.yml" --destination="$install_dir/app/config/parameters.yml"
ynh_add_config --template="parameters.yml" --destination="$install_dir/app/config/parameters.yml"
$php_exec cache:clear --env=prod
#=================================================
# UPGRADE WALLABAG
#=================================================
# Alias for php-cli execution command
php_exec="ynh_exec_as $app php${YNH_PHP_VERSION} "$install_dir/bin/console" --no-interaction --env=prod"
# Set permissions to app files
chown -R $app: $install_dir

View file

@ -8,6 +8,7 @@ test_format = 1.0
# -------------------------------
args.language = "fr"
args.name = "wallabag"
# -------------------------------
# Commits to test upgrade from