mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
Add parameters.yml (#209)
* Add parameters.yml * Update upgrade * Update change_url
This commit is contained in:
parent
a2316d7f7d
commit
686fb36ca0
6 changed files with 78 additions and 36 deletions
74
conf/parameters.yml
Normal file
74
conf/parameters.yml
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
# 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_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_charset: utf8mb4
|
||||||
|
|
||||||
|
domain_name: https://__DOMAIN____PATH__
|
||||||
|
server_name: "Your wallabag instance"
|
||||||
|
|
||||||
|
mailer_transport: smtp
|
||||||
|
mailer_user: ~
|
||||||
|
mailer_password: ~
|
||||||
|
mailer_host: 127.0.0.1
|
||||||
|
mailer_port: false
|
||||||
|
mailer_encryption: ~
|
||||||
|
mailer_auth_mode: ~
|
||||||
|
|
||||||
|
locale: en
|
||||||
|
|
||||||
|
# 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
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
sentry_dsn: ~
|
|
@ -4,8 +4,6 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
wb_conf="$install_dir/app/config/parameters.yml"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -24,7 +24,7 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name
|
||||||
<<< "UPDATE internal_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'"
|
<<< "UPDATE internal_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'"
|
||||||
|
|
||||||
# Change domain name in parameters.yml
|
# Change domain name in parameters.yml
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path"
|
ynh_replace_string --target_file="$install_dir/app/config/parameters.yml" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path"
|
||||||
|
|
||||||
# If "Download images locally" option has been enabled in Internal Settings
|
# If "Download images locally" option has been enabled in Internal Settings
|
||||||
download_images_enabled=$(ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \
|
download_images_enabled=$(ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \
|
||||||
|
|
|
@ -40,19 +40,10 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding $app's configuration files..." --weight=1
|
ynh_script_progression --message="Adding $app's configuration files..." --weight=1
|
||||||
|
|
||||||
# Copy and set Wallabag dist configuration
|
ynh_add_config --template="parameters.yml" --destination="$install_dir/app/config/parameters.yml"
|
||||||
cp "$install_dir/app/config/parameters.yml.dist" "$wb_conf"
|
|
||||||
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="fosuser_registration: true" --replace_string="fosuser_registration: false"
|
chmod 600 "$install_dir/app/config/parameters.yml"
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_name: wallabag" --replace_string="database_name: $db_name"
|
chown "$app:$app" "$install_dir/app/config/parameters.yml"
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_user: root" --replace_string="database_user: $db_user"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_password: ~" --replace_string="database_password: $db_pwd"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_table_prefix: wallabag_" --replace_string="database_table_prefix: null"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" --replace_string="secret: $deskey"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: https://your-wallabag-url-instance.com" --replace_string="domain_name: https://$domain$path"
|
|
||||||
|
|
||||||
chmod 600 "$wb_conf"
|
|
||||||
chown -R "$app:www-data" "$install_dir"
|
|
||||||
|
|
||||||
# Alias for php-cli execution command
|
# Alias for php-cli execution command
|
||||||
php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod)
|
php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod)
|
||||||
|
|
|
@ -23,8 +23,6 @@ if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then
|
||||||
chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php"
|
chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 600 "$wb_conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,11 +7,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
|
||||||
#=================================================
|
|
||||||
# ynh_script_progression --message="Ensuring downward compatibility..."
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -37,20 +32,6 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring $app..." --weight=1
|
ynh_script_progression --message="Reconfiguring $app..." --weight=1
|
||||||
|
|
||||||
# Copy and set Wallabag dist configuration
|
|
||||||
cp "$install_dir/app/config/parameters.yml.dist" "$wb_conf"
|
|
||||||
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="fosuser_registration: true" --replace_string="fosuser_registration: false"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_name: wallabag" --replace_string="database_name: $db_name"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_user: root" --replace_string="database_user: $db_user"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_password: ~" --replace_string="database_password: $db_pwd"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="database_table_prefix: wallabag_" --replace_string="database_table_prefix: null"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" --replace_string="secret: $deskey"
|
|
||||||
ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: https://your-wallabag-url-instance.com" --replace_string="domain_name: https://$domain$path"
|
|
||||||
|
|
||||||
chmod 600 "$wb_conf"
|
|
||||||
chown -R "$app:www-data" "$install_dir"
|
|
||||||
|
|
||||||
# Alias for php-cli execution command
|
# Alias for php-cli execution command
|
||||||
php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod)
|
php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue