mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Add redis caching
This commit is contained in:
parent
369aa59dc8
commit
85262b057d
7 changed files with 20 additions and 12 deletions
|
@ -1,4 +1,6 @@
|
|||
# funkwhale_ynh
|
||||
A modern, convivial and free music server on YunoHost
|
||||
|
||||
Warning: installation has to be done on root for now. I'm working on enabling it in subpath.
|
||||
Installation has to be done on root for now. I'm working on enabling it in subpath.
|
||||
|
||||
Admin passwork is **funkwhale**, login is what you provied at installation.
|
|
@ -72,7 +72,7 @@ DATABASE_URL=postgresql://__DBUSER__:__DBPWD__@:5432/__DBNAME__
|
|||
# CACHE_URL=redis://<host>:<port>/<database>
|
||||
# CACHE_URL=redis://localhost:6379/0
|
||||
# Use the next one if you followed Debian installation guide
|
||||
# CACHE_URL=redis://127.0.0.1:6379/0
|
||||
CACHE_URL=redis://127.0.0.1:6379/__APP__
|
||||
|
||||
# Where media files (such as album covers or audio tracks) should be stored
|
||||
# on your system?
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"yunohost": ">= 3.0.0~beta1.2"
|
||||
},
|
||||
"description": {
|
||||
"en": "A translation platform using Git and Python"
|
||||
"en": "A modern, convivial and free music server"
|
||||
},
|
||||
"version": "0.12.0-1",
|
||||
"url": "https://funkwhale.audio",
|
||||
|
|
|
@ -75,7 +75,8 @@ echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/a
|
|||
ynh_package_update
|
||||
|
||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
||||
redis-server
|
||||
|
||||
#=================================================
|
||||
# CREATE A PostgreSQL DATABASE
|
||||
|
@ -162,6 +163,7 @@ key=$(ynh_string_random)
|
|||
|
||||
ynh_app_setting_set "$app" key "$key"
|
||||
|
||||
ynh_replace_string "__APP__" "$app" "$configfile"
|
||||
ynh_replace_string "__PORT__" "$port" "$configfile"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$configfile"
|
||||
ynh_replace_string "__DBUSER__" "$db_name" "$configfile"
|
||||
|
|
|
@ -35,13 +35,6 @@ ynh_remove_systemd_config "$app-beat"
|
|||
systemctl stop "$app".target
|
||||
ynh_secure_remove "/etc/systemd/system/$app.target"
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE THE PostgreSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -73,7 +73,8 @@ ynh_system_user_create "$app"
|
|||
#=================================================
|
||||
|
||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
||||
redis-server
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PostgreSQL DATABASE
|
||||
|
|
|
@ -97,8 +97,17 @@ ynh_add_nginx_config
|
|||
# Create a system user
|
||||
ynh_system_user_create "$app"
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
||||
redis-server
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# PYTHON DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
|
@ -125,6 +134,7 @@ key=$(ynh_string_random)
|
|||
|
||||
ynh_app_setting_set "$app" key "$key"
|
||||
|
||||
ynh_replace_string "__APP__" "$app" "$configfile"
|
||||
ynh_replace_string "__PORT__" "$port" "$configfile"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$configfile"
|
||||
ynh_replace_string "__DBUSER__" "$db_name" "$configfile"
|
||||
|
|
Loading…
Reference in a new issue