diff --git a/conf/parameters.yml b/conf/parameters.yml index cba8c9d..f231f54 100644 --- a/conf/parameters.yml +++ b/conf/parameters.yml @@ -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__" diff --git a/manifest.toml b/manifest.toml index ea33008..abee470 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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" diff --git a/scripts/install b/scripts/install index 3a87058..85594cf 100644 --- a/scripts/install +++ b/scripts/install @@ -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" diff --git a/scripts/upgrade b/scripts/upgrade index d9c81e7..9144704 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 diff --git a/tests.toml b/tests.toml index bb4bc69..9570b9c 100644 --- a/tests.toml +++ b/tests.toml @@ -8,6 +8,7 @@ test_format = 1.0 # ------------------------------- args.language = "fr" + args.name = "wallabag" # ------------------------------- # Commits to test upgrade from