mirror of
https://github.com/YunoHost-Apps/photoprism_ynh.git
synced 2024-09-03 19:56:41 +02:00
First try with .env
This commit is contained in:
parent
8f8631d4f5
commit
708ebb244b
4 changed files with 31 additions and 10 deletions
23
conf/.env
Normal file
23
conf/.env
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
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_SITE_URL="https://__DOMAIN____PATH_URL__"
|
||||||
|
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_PASSWORD="__DB_PWD__"
|
||||||
|
PHOTOPRISM_DEFAULT_THEME="lavendel"
|
||||||
|
PHOTOPRISM_DEFAULT_LOCALE="__LANGUAGE_KEY__"
|
||||||
|
PHOTOPRISM_SITE_DESCRIPTION="__APP__"
|
||||||
|
PHOTOPRISM_DEBUG="false"
|
||||||
|
PHOTOPRISM_DARKTABLE_BIN="/usr/bin/darktable-cli"
|
||||||
|
PHOTOPRISM_HEIFCONVERT_BIN="__FINALPATH__/bin/heif-convert"
|
||||||
|
PHOTOPRISM_FFMPEG_BIN="/usr/bin/ffmpeg"
|
||||||
|
PHOTOPRISM_EXIFTOOL_BIN="/usr/bin/exiftool"
|
|
@ -6,14 +6,12 @@ After=network.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
|
EnvironmentFile=__FINALPATH__/.env
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=__FINALPATH__/live/bin/photoprism --config-path __FINALPATH__/live/config/ --trace start
|
ExecStart=__FINALPATH__/live/bin/photoprism --trace start
|
||||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
TimeoutSec=900
|
TimeoutSec=900
|
||||||
Environment="PHOTOPRISM_HEIFCONVERT_BIN=__FINALPATH__/bin/heif-convert"
|
|
||||||
Environment="PHOTOPRISM_FFMPEG_BIN=/usr/bin/ffmpeg"
|
|
||||||
Environment="PHOTOPRISM_EXIFTOOL_BIN=/usr/bin/exiftool"
|
|
||||||
|
|
||||||
# Sandboxing options to harden security
|
# Sandboxing options to harden security
|
||||||
# Depending on specificities of your service/app, you may need to tweak these
|
# Depending on specificities of your service/app, you may need to tweak these
|
||||||
|
|
|
@ -155,10 +155,10 @@ chown -R $app:www-data "$datadir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..."
|
ynh_script_progression --message="Adding a configuration file..."
|
||||||
|
|
||||||
ynh_add_config --template="../conf/options.yml" --destination="$final_path/live/config/options.yml"
|
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
||||||
|
|
||||||
chmod 600 "$final_path/live/config/options.yml"
|
chmod 600 "$final_path/.env"
|
||||||
chown $app:$app "$final_path/live/config/options.yml"
|
chown $app:$app "$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
|
@ -157,10 +157,10 @@ chown -R $app:www-data "$datadir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..."
|
ynh_script_progression --message="Updating a configuration file..."
|
||||||
|
|
||||||
ynh_add_config --template="../conf/options.yml" --destination="$final_path/live/config/options.yml"
|
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
||||||
|
|
||||||
chmod 600 "$final_path/live/config/options.yml"
|
chmod 600 "$final_path/.env"
|
||||||
chown $app:$app "$final_path/live/config/options.yml"
|
chown $app:$app "$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
Loading…
Add table
Reference in a new issue