mirror of
https://github.com/YunoHost-Apps/photonix_ynh.git
synced 2024-09-03 19:56:29 +02:00
Update to version 2020-05-03
This commit is contained in:
parent
7cd69c3981
commit
20e1d471ab
6 changed files with 38 additions and 41 deletions
|
@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
## Overview
|
||||
Photonix is a photo management application that streamlines the process of storing, presenting and re-discovering photos. Smart filtering is made possible automatically by object recognition, location awareness, color analysis and other algorithms.
|
||||
|
||||
**Shipped version:** 2021-04-18
|
||||
**Shipped version:** 2021-05-03
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -52,7 +52,7 @@ Can the app be used by multiple users? **Yes**
|
|||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/photonix_ynh/issues
|
||||
* App website: https://photonix.org/
|
||||
* Upstream app repository: https://github.com/damianmoore/photonix/
|
||||
* Upstream app repository: https://github.com/photonixapp/photonix/
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
|
|||
## Vue d'ensemble
|
||||
Photonix est une application de gestion de photos qui simplifie le processus de stocker, présenter er re-découvrir ses photos. Le filtrage intelligent est rendu possible automatiquement grâce à la reconnaissance d'objets, la localisation, l'analyse de couleurs, et d'autres algorithmes.
|
||||
|
||||
**Version incluse :** 2021-04-18
|
||||
**Version incluse :** 2021-05-03
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
|
@ -52,7 +52,7 @@ Un panneau admin est accessible depuis `https://votre.domiane.tld/admin/`.
|
|||
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/photonix_ynh/issues
|
||||
* Site de l'application : https://photonix.org/
|
||||
* Dépôt de l'application principale : https://github.com/damianmoore/photonix/
|
||||
* Dépôt de l'application principale : https://github.com/photonixapp/photonix/
|
||||
* Site web YunoHost : https://yunohost.org/
|
||||
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
SOURCE_URL=https://github.com/damianmoore/photonix/tarball/1a0c9fb97aefb8cfccf7a61d086901d856980b14
|
||||
SOURCE_SUM=b653e6e101c26795c970e28e054922f0f5bdd61c608a5c10e6a82859960d34ca
|
||||
SOURCE_URL=https://github.com/photonixapp/photonix/tarball/c0609b88895cd1b27fa6c769d19bebb6875cb869
|
||||
SOURCE_SUM=272ff9a4c3274463caeb7494839f7a0a23748a183af79bc2ba0c34d846532a19
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=1a0c9fb97aefb8cfccf7a61d086901d856980b14
|
||||
SOURCE_FILENAME=c0609b88895cd1b27fa6c769d19bebb6875cb869
|
||||
SOURCE_EXTRACT=true
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Photo management application that streamlines the process of storing, presenting and re-discovering photos",
|
||||
"fr": "Application de gestion de photos qui simplifie le processus de stocker, présenter er re-découvrir ses photos"
|
||||
},
|
||||
"version": "0.0.20210418~ynh1",
|
||||
"version": "0.0.20210503~ynh1",
|
||||
"url": "https://photonix.org/",
|
||||
"license": "AGPL-3.0-only",
|
||||
"maintainer": {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="acl python3 python3-pip python3-venv curl build-essential gnupg libjpeg-dev libpq-dev libtiff5-dev dcraw libimage-exiftool-perl netcat nodejs libpq-dev postgresql postgresql-contrib postgresql-common redis-server libsasl2-dev libldap2-dev libssl-dev"
|
||||
pkg_dependencies="acl python3 python3-pip python3-venv nodejs postgresql postgresql-contrib postgresql-common redis-server libsasl2-dev libldap2-dev libssl-dev build-essential curl gfortran gnupg libatlas-base-dev libblas-dev libblas3 libfreetype6 libfreetype6-dev libhdf5-dev libjpeg-dev liblapack-dev liblapack3 libpq-dev libtiff5-dev netcat"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
@ -44,17 +44,21 @@ function patch_files {
|
|||
|
||||
function build_django_backend {
|
||||
chown -R $app:$app "$final_path"
|
||||
pushd "$final_path" || ynh_die
|
||||
sudo -u $app python3 -m venv "$final_path/venv"
|
||||
sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U wheel pip setuptools 2>&1
|
||||
sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement requirements.txt 2>&1
|
||||
sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U django-auth-ldap 2>&1
|
||||
pushd "$final_path"
|
||||
sudo -u $app python3 -m venv "$final_path/venv"
|
||||
sudo -u $app $final_path/venv/bin/pip --cache-dir "$final_path/.cache/pip" install -U wheel pip setuptools 2>&1
|
||||
while read requirement ; do
|
||||
if [ ! -z "$requirement" ] && [[ ! "$requirement" =~ ^'#'.* ]]; then
|
||||
sudo -u $app PYTHONUNBUFFERED=1 "$final_path/venv/bin/pip" --cache-dir "$final_path/.cache/pip" install "$requirement" 2>&1
|
||||
fi
|
||||
done < "$final_path/requirements.txt"
|
||||
sudo -u $app $final_path/venv/bin/pip --cache-dir "$final_path/.cache/pip" install -U django-auth-ldap 2>&1
|
||||
sudo -u $app mkdir -p "$final_path/srv"
|
||||
sudo -u $app cp -rT "$final_path/photonix" "$final_path/srv/photonix"
|
||||
popd || ynh_die
|
||||
pushd "$final_path/srv" || ynh_die
|
||||
popd
|
||||
pushd "$final_path/srv"
|
||||
sudo -u $app $final_path/venv/bin/python "$final_path/srv/photonix/manage.py" collectstatic --noinput --link 2>&1
|
||||
popd || ynh_die
|
||||
popd
|
||||
|
||||
set_permissions
|
||||
}
|
||||
|
@ -71,17 +75,17 @@ function build_node_frontend {
|
|||
chown -R $app:$app "$final_path"
|
||||
sudo -u $app touch "$final_path/.yarnrc"
|
||||
sudo -u $app mkdir -p "$final_path/srv/ui"
|
||||
pushd "$final_path" || ynh_die
|
||||
pushd "$final_path"
|
||||
sudo -u $app cp -T "$final_path/ui/package.json" "$final_path/srv/ui/package.json"
|
||||
sudo -u $app cp -T "$final_path/ui/yarn.lock" "$final_path/srv/ui/yarn.lock"
|
||||
popd || ynh_die
|
||||
popd
|
||||
|
||||
pushd "$final_path/srv/ui" || ynh_die
|
||||
pushd "$final_path/srv/ui"
|
||||
sudo -u $app env "PATH=$node_path" yarn --cache-folder $final_path/yarn-cache --use-yarnrc $final_path/.yarnrc install 2>&1
|
||||
sudo -u $app cp -rT "$final_path/ui/public" "$final_path/srv/ui/public"
|
||||
sudo -u $app cp -rT "$final_path/ui/src" "$final_path/srv/ui/src"
|
||||
sudo -u $app env "PATH=$node_path" yarn --cache-folder $final_path/yarn-cache --use-yarnrc $final_path/.yarnrc build 2>&1
|
||||
popd || ynh_die
|
||||
popd
|
||||
|
||||
sudo -u $app cp -rT "$final_path/ui/public" "$final_path/srv/ui/public"
|
||||
|
||||
|
@ -109,8 +113,7 @@ function apply_db_migrations {
|
|||
source \"$final_path/photonix.env\"
|
||||
python \"$final_path/photonix/manage.py\" makemigrations
|
||||
python \"$final_path/photonix/manage.py\" migrate"
|
||||
popd || ynh_die
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
services="app_server watch_photos raw_scheduler raw_processor thumbnail_processor classification_scheduler classification_color_processor classification_location_processor classification_style_processor classification_object_processor rescan_photos_periodically"
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
diff --git a/photonix/web/settings.py b/photonix/web/settings.py
|
||||
index e6caf58..a5ca667 100644
|
||||
index 8428b0c..9008613 100644
|
||||
--- a/photonix/web/settings.py
|
||||
+++ b/photonix/web/settings.py
|
||||
@@ -13,7 +13,7 @@ https://docs.djangoproject.com/en/1.10/ref/settings/
|
||||
from datetime import timedelta
|
||||
import os
|
||||
from pathlib import Path
|
||||
-
|
||||
@@ -16,11 +16,12 @@ from pathlib import Path
|
||||
|
||||
from django.core.management import utils
|
||||
|
||||
+import ldap
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = str(Path(__file__).parent.parent.resolve())
|
||||
@@ -22,7 +22,7 @@ BASE_DIR = str(Path(__file__).parent.parent.resolve())
|
||||
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
-SECRET_KEY = 'r*z#sh2aqb!zjz#s7h@5&toyx@t_r4nfrgwg%r$4)2@d@8ypyb'
|
||||
-SECRET_KEY = utils.get_random_secret_key()
|
||||
+SECRET_KEY = os.environ['SECRET_KEY']
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = os.environ.get('ENV', 'prd') != 'prd'
|
||||
@@ -93,6 +93,7 @@ DATABASES = {
|
||||
|
||||
@@ -92,6 +93,7 @@ DATABASES = {
|
||||
}
|
||||
|
||||
AUTHENTICATION_BACKENDS = [
|
||||
|
@ -28,13 +24,11 @@ index e6caf58..a5ca667 100644
|
|||
'graphql_jwt.backends.JSONWebTokenBackend',
|
||||
'django.contrib.auth.backends.ModelBackend',
|
||||
]
|
||||
@@ -117,6 +118,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
},
|
||||
]
|
||||
@@ -189,3 +191,7 @@ GRAPHQL_JWT = {
|
||||
APPEND_SLASHES = False
|
||||
|
||||
CORS_ORIGIN_WHITELIST = []
|
||||
+
|
||||
+AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=users,dc=yunohost,dc=org"
|
||||
+
|
||||
+AUTH_LDAP_USER_ATTR_MAP = {"username": "uid", "first_name": "givenName", "email": "mail", "last_name": "sn"}
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
||||
|
|
Loading…
Add table
Reference in a new issue