mirror of
https://github.com/YunoHost-Apps/photoprism_ynh.git
synced 2024-09-03 19:56:41 +02:00
finish the transition to official builds
This commit is contained in:
parent
48ef01a57d
commit
c98021e8fd
7 changed files with 30 additions and 40 deletions
|
@ -1,8 +1,8 @@
|
|||
PHOTOPRISM_ASSETS_PATH="__INSTALL_DIR__/assets"
|
||||
PHOTOPRISM_CACHE_PATH="/home/yunohost.app/__APP__/cache"
|
||||
PHOTOPRISM_ORIGINALS_PATH="/home/yunohost.app/__APP__/photos/originals"
|
||||
PHOTOPRISM_IMPORT_PATH="/home/yunohost.app/__APP__/photos/import"
|
||||
PHOTOPRISM_TEMP_PATH="/home/yunohost.app/__APP__/temp"
|
||||
PHOTOPRISM_CACHE_PATH="__DATA_DIR__/cache"
|
||||
PHOTOPRISM_ORIGINALS_PATH="__DATA_DIR__/photos/originals"
|
||||
PHOTOPRISM_IMPORT_PATH="__DATA_DIR__/photos/import"
|
||||
PHOTOPRISM_TEMP_PATH="__DATA_DIR__/temp"
|
||||
PHOTOPRISM_SITE_URL="https://__DOMAIN____PATH__"
|
||||
PHOTOPRISM_ADMIN_PASSWORD="__PASSWORD__"
|
||||
PHOTOPRISM_HTTP_HOST="127.0.0.1"
|
||||
|
|
|
@ -1 +1 @@
|
|||
All data is stored in `__DATA_DIR__/photos/`. Be careful, this data is not backed-up by default when doing a backup
|
||||
All data is stored in `__DATA_DIR__/photos/`. Be careful, this data is not backed-up by default when doing a backup.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Les données sont stockées dans `__DATA_DIR__/photos/`. Attention, ces données ne sont pas sauvegardées par défaut lorsqu'une sauvegarde est lancée
|
||||
Les données sont stockées dans `__DATA_DIR__/photos/`. Attention, ces données ne sont pas sauvegardées par défaut lorsqu'une sauvegarde est lancée.
|
||||
|
|
|
@ -21,7 +21,7 @@ code = "https://github.com/photoprism/photoprism"
|
|||
fund = "https://www.photoprism.app/membership"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2"
|
||||
yunohost = ">= 12.0"
|
||||
architectures = ["amd64", "arm64", "armhf"]
|
||||
multi_instance = false
|
||||
ldap = false
|
||||
|
@ -65,6 +65,10 @@ ram.runtime = "50M"
|
|||
arm64.url = "https://github.com/photoprism/photoprism/releases/download/231128-f48ff16ef/photoprism_231128-f48ff16ef-linux-arm64.tar.gz"
|
||||
arm64.sha256 = "2ddc7500d2055fd76bab229920330f25e007ad1e8e3c36ca34ace16bafa16b09"
|
||||
|
||||
autoupdate.strategy = "latest_github_release"
|
||||
autoupdate.asset.amd64 = ".*amd64.tar.gz"
|
||||
autoupdate.asset.arm64 = ".*arm64.tar.gz"
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
|
|
@ -36,10 +36,10 @@ ynh_script_progression --message="Updating a configuration file..."
|
|||
domain=$new_domain
|
||||
path=$new_path
|
||||
|
||||
ynh_add_config --template="options.yml" --destination="$install_dir/live/config/options.yml"
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 400 "$install_dir/live/config/options.yml"
|
||||
chown $app:$app "$install_dir/live/config/options.yml"
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -66,7 +66,7 @@ ynh_script_progression --message="Adding a configuration file..."
|
|||
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 600 "$install_dir/.env"
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -30,6 +30,18 @@ if [ -z "${language_key:-}" ]; then
|
|||
ynh_app_setting_delete --app=$app --key=language
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -38,39 +50,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# MAKE INSTALL
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making install..."
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir/build/"
|
||||
|
||||
mkdir -p "$install_dir/live/"
|
||||
rsync -a "$install_dir/build/opt/photoprism/" "$install_dir/live/"
|
||||
ynh_secure_remove --file="$install_dir/build"
|
||||
fi
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# UPDATE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating data directory..."
|
||||
|
||||
mkdir -p $data_dir
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
rsync -a "$install_dir/live/assets/" "$data_dir/assets/"
|
||||
ynh_secure_remove --file="$install_dir/live/assets/"
|
||||
fi
|
||||
# assets location has changed to the $install_dir
|
||||
ynh_secure_remove $data_dir/assets
|
||||
|
||||
chmod 750 "$data_dir"
|
||||
chmod -R o-rwx "$data_dir"
|
||||
|
@ -83,7 +69,7 @@ ynh_script_progression --message="Updating a configuration file..."
|
|||
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 600 "$install_dir/.env"
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue