mirror of
https://github.com/YunoHost-Apps/photoprism_ynh.git
synced 2024-09-03 19:56:41 +02:00
Merge 5f7a924e46
into 4b51b7ad2d
This commit is contained in:
commit
95a0b9e49b
10 changed files with 88 additions and 103 deletions
27
conf/.env
27
conf/.env
|
@ -1,24 +1,35 @@
|
|||
PHOTOPRISM_ASSETS_PATH="/home/yunohost.app/__APP__/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_CONFIG_PATH="__DATA_DIR__/config/"
|
||||
PHOTOPRISM_ASSETS_PATH="__INSTALL_DIR__/assets"
|
||||
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_USERS_PATH="__DATA_DIR__/users"
|
||||
|
||||
PHOTOPRISM_BACKUP_PATH="__DATA_DIR__/backups"
|
||||
|
||||
PHOTOPRISM_SITE_URL="https://__DOMAIN____PATH__"
|
||||
PHOTOPRISM_ADMIN_USER="__ADMIN__"
|
||||
PHOTOPRISM_ADMIN_PASSWORD="__PASSWORD__"
|
||||
PHOTOPRISM_HTTP_HOST="127.0.0.1"
|
||||
PHOTOPRISM_HTTP_MODE="release"
|
||||
PHOTOPRISM_HTTP_PORT="__PORT__"
|
||||
|
||||
PHOTOPRISM_DATABASE_DRIVER="MySQL"
|
||||
PHOTOPRISM_DATABASE_SERVER="127.0.0.1"
|
||||
PHOTOPRISM_DATABASE_NAME="photoprism"
|
||||
PHOTOPRISM_DATABASE_USER="photoprism"
|
||||
PHOTOPRISM_DATABASE_NAME="__DB_NAME__"
|
||||
PHOTOPRISM_DATABASE_USER="__DB_USER__"
|
||||
PHOTOPRISM_DATABASE_PASSWORD="__DB_PWD__"
|
||||
|
||||
PHOTOPRISM_DEFAULT_THEME="lavendel"
|
||||
PHOTOPRISM_DEFAULT_LOCALE="__LANGUAGE_KEY__"
|
||||
PHOTOPRISM_SITE_DESCRIPTION="__APP__"
|
||||
PHOTOPRISM_APP_NAME="__APP__"
|
||||
|
||||
PHOTOPRISM_DEBUG="false"
|
||||
PHOTOPRISM_DARKTABLE_BIN="/usr/bin/darktable-cli"
|
||||
PHOTOPRISM_HEIFCONVERT_BIN="__INSTALL_DIR__/bin/heif-convert"
|
||||
PHOTOPRISM_FFMPEG_BIN="/usr/bin/ffmpeg"
|
||||
PHOTOPRISM_EXIFTOOL_BIN="/usr/bin/exiftool"
|
||||
PHOTOPRISM_UPLOAD_NSFW="true"
|
||||
|
||||
PHOTOPRISM_UPLOAD_NSFW="true"
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
Debug: false
|
||||
DarktableBin: /usr/bin/darktable-cli
|
||||
AssetsPath: /home/yunohost.app/__APP__/assets
|
||||
CachePath: /home/yunohost.app/__APP__/cache
|
||||
OriginalsPath: /home/yunohost.app/__APP__/photos/originals
|
||||
ImportPath: /home/yunohost.app/__APP__/photos/import
|
||||
TempPath: /home/yunohost.app/__APP__/temp
|
||||
SiteUrl: https://__DOMAIN____PATH__
|
||||
AdminPassword: __PASSWORD__
|
||||
HttpServerHost: 127.0.0.1
|
||||
HttpMode: release
|
||||
HttpPort: __PORT__
|
||||
HttpPassword:
|
||||
DatabaseDriver: MySQL
|
||||
DatabaseServer: 127.0.0.1
|
||||
DatabaseName: photoprism
|
||||
DatabaseUser: photoprism
|
||||
DatabasePassword: __DB_PWD__
|
||||
Theme: lavendel
|
||||
Language: __LANGUAGE_KEY__
|
||||
SiteDescription: __APP__
|
|
@ -15,11 +15,11 @@ TemporaryFileSystem=/:ro
|
|||
|
||||
BindReadOnlyPaths=-/lib/ -/lib64/ -/usr/lib/ -/usr/lib64/ -/etc/ld.so.cache -/etc/ld.so.conf -/etc/ld.so.conf.d/ -/etc/bindresvport.blacklist -/usr/share/zoneinfo/ -/usr/share/locale/ -/etc/localtime -/usr/share/common-licenses/ -/etc/ssl/certs/ -/etc/alternatives/
|
||||
BindReadOnlyPaths=-/dev/log -/run/systemd/journal/socket -/run/systemd/journal/stdout -/run/systemd/notify
|
||||
BindPaths=/var/www/photoprism /var/www/photoprism/live/bin /home/yunohost.app/photoprism -/usr -/etc -/var -/home -/dev -/etc -/media -/mnt -/opt -/proc -/run -/srv -/sys -/tmp
|
||||
BindPaths=__INSTALL_DIR__ __INSTALL_DIR__/bin __DATA_DIR__ -/usr -/etc -/var -/home -/dev -/etc -/media -/mnt -/opt -/proc -/run -/srv -/sys -/tmp
|
||||
|
||||
EnvironmentFile=__INSTALL_DIR__/.env
|
||||
WorkingDirectory=__INSTALL_DIR__/live/bin
|
||||
ExecStart=__INSTALL_DIR__/live/bin/photoprism --trace start
|
||||
WorkingDirectory=__INSTALL_DIR__/bin
|
||||
ExecStart=__INSTALL_DIR__/bin/photoprism --trace start
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
TimeoutSec=900
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -9,7 +9,7 @@ description.gl = "App de Fotos con tecnoloxía IA para a Web Descentralizada"
|
|||
description.ca = "Aplicació de fotografia amb IA per la web descentralitzada"
|
||||
description.fr = "Gestion de photos en ligne"
|
||||
|
||||
version = "2022.09.01~ynh4"
|
||||
version = "2024.05.31~ynh1"
|
||||
|
||||
maintainers = ["Thovi98"]
|
||||
|
||||
|
@ -23,9 +23,9 @@ 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
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
sso = false
|
||||
disk = "50M"
|
||||
|
@ -48,6 +48,9 @@ ram.runtime = "50M"
|
|||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
[install.admin]
|
||||
type = "user"
|
||||
|
||||
[install.language]
|
||||
ask.en = "Choose the application language"
|
||||
ask.gl = "Elixe o idioma da aplicación"
|
||||
|
@ -67,25 +70,25 @@ ram.runtime = "50M"
|
|||
[resources]
|
||||
[resources.sources]
|
||||
[resources.sources.main]
|
||||
format = "docker"
|
||||
extract = true
|
||||
prefetch = false
|
||||
amd64.url = "https://github.com/photoprism/photoprism/releases/download/240531-60b3a4628/photoprism_240531-60b3a4628-linux-amd64.tar.gz"
|
||||
amd64.sha256 = "1859df8e95c054fb4ff9c9de80ed0db96a1126f91d3e57946628fa92008229eb"
|
||||
|
||||
amd64.url = "photoprism/photoprism:220901-bullseye"
|
||||
amd64.sha256 = "3381d40181ecdf62932e9530c6b81e6e0f8828a3d373d8dedf662aab96dafba4"
|
||||
arm64.url = "https://github.com/photoprism/photoprism/releases/download/240531-60b3a4628/photoprism_240531-60b3a4628-linux-arm64.tar.gz"
|
||||
arm64.sha256 = "16d5ef94dd733bd46db49b10c25a019b9510e690d40efee1d691c20a72263044"
|
||||
|
||||
arm64.url = "photoprism/photoprism:220901-bullseye"
|
||||
arm64.sha256 = "3dcffda0a2b58c91479c883205025edee4ea799fc35be419f9bec708ccb54b7f"
|
||||
armhf.url = "https://github.com/photoprism/photoprism/releases/download/240531-60b3a4628/photoprism_240531-60b3a4628-linux-arm.tar.gz"
|
||||
armhf.sha256 = "be9f10f8fe65d2cde285d0eafca3067c9f4344eb56cc01566e52f14027f929f2"
|
||||
|
||||
armhf.url = "photoprism/photoprism:220901-bullseye"
|
||||
armhf.sha256 = "a74f4d0a220af9a5291307bfba36f662d97c4df143f04d951e3c30111916317e"
|
||||
autoupdate.strategy = "latest_github_release"
|
||||
autoupdate.asset.amd64 = ".*amd64.tar.gz"
|
||||
autoupdate.asset.arm64 = ".*arm64.tar.gz"
|
||||
autoupdate.asset.armhf = ".*arm.tar.gz"
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
||||
|
||||
[resources.data_dir]
|
||||
subdirs = ["assets"]
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
|
@ -100,6 +103,15 @@ ram.runtime = "50M"
|
|||
|
||||
[resources.apt]
|
||||
packages = [
|
||||
"exiftool",
|
||||
"darktable",
|
||||
"rawtherapee",
|
||||
"imagemagick",
|
||||
"libvips42",
|
||||
"libjxl-tools",
|
||||
"ffmpeg",
|
||||
"sqlite3",
|
||||
"tzdata",
|
||||
"libc6-dev",
|
||||
"libssl-dev",
|
||||
"libxft-dev",
|
||||
|
@ -115,7 +127,6 @@ ram.runtime = "50M"
|
|||
"libfontconfig1",
|
||||
"libfontconfig1-dev",
|
||||
"libzmq3-dev",
|
||||
"ffmpeg",
|
||||
"libimage-exiftool-perl",
|
||||
"mariadb-server",
|
||||
]
|
||||
|
|
|
@ -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 600 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -34,7 +34,9 @@ ynh_app_setting_set --app=$app --key=password --value="$password"
|
|||
#=================================================
|
||||
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"
|
||||
|
@ -48,33 +50,11 @@ ynh_script_progression --message="Configuring NGINX web server..."
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
# MAKE INSTALL
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making install..."
|
||||
|
||||
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"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# CREATE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a data directory..."
|
||||
|
||||
#mkdir -p $data_dir
|
||||
rsync -a "$install_dir/live/assets/" "$data_dir/assets/"
|
||||
ynh_secure_remove --file="$install_dir/live/assets/"
|
||||
|
||||
chmod 750 "$data_dir"
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
|
|
@ -17,7 +17,6 @@ ynh_script_progression --message="Checking version..."
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -30,6 +29,23 @@ if [ -z "${language_key:-}" ]; then
|
|||
ynh_app_setting_delete --app=$app --key=language
|
||||
fi
|
||||
|
||||
if [ -z "${admin:-}" ]; then
|
||||
admin="admin"
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
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 +54,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"
|
||||
|
@ -86,6 +76,19 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
|||
chmod 600 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# RUNNNING DB MIGRATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Running database migrations..."
|
||||
|
||||
if ynh_compare_current_package_version --comparison lt --version 2024.05.31~ynh1
|
||||
then
|
||||
ynh_exec_warn_less $install_dir/bin/photoprism \
|
||||
--assets-path=$install_dir/assets \
|
||||
--originals-path=/home/yunohost.app/photoprism/photos/originals \
|
||||
--import-path=/home/yunohost.app/photoprism/photos/import users reset --yes
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
|
@ -5,3 +5,4 @@ test_format = 1.0
|
|||
[default]
|
||||
|
||||
test_upgrade_from.fe71ba9.name = "Packaging v1"
|
||||
test_upgrade_from.678f0f9.name = "2022.09.01~ynh4"
|
||||
|
|
Loading…
Add table
Reference in a new issue