1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/photoprism_ynh.git synced 2024-09-03 19:56:41 +02:00

change build directory to binaries

This commit is contained in:
Limezy 2022-06-09 00:35:07 +07:00
parent c4b3f50e98
commit 4db29f0f62
3 changed files with 11 additions and 13 deletions

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/build/bin/photoprism --config-path __FINALPATH__/build/config/ --trace start ExecStart=__FINALPATH__/binaries/bin/photoprism --config-path __FINALPATH__/binaries/config/ --trace start
StandardOutput=append:/var/log/__APP__/__APP__.log StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit StandardError=inherit

View file

@ -149,8 +149,7 @@ pushd "$final_path"
# Setup node environment # Setup node environment
export NODE_OPTIONS=--max_old_space_size=1024 export NODE_OPTIONS=--max_old_space_size=1024
# Build server from source # Build server from source
ynh_secure_remove --file="$final_path/build" make all install DESTDIR=$final_path/binaries 2>&1
make all install DESTDIR=$final_path/build 2>&1
ynh_secure_remove --file="$final_path/go" ynh_secure_remove --file="$final_path/go"
popd popd
@ -164,7 +163,7 @@ ynh_app_setting_set --app=$app --key=datadir --value=$datadir
mkdir -p $datadir mkdir -p $datadir
mkdir "$datadir/assets/" mkdir "$datadir/assets/"
mv "$final_path/build/assets/"* "$datadir/assets/" mv "$final_path/binaries/assets/"* "$datadir/assets/"
chmod 750 "$datadir" chmod 750 "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
@ -176,9 +175,9 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --time --weight=1 ynh_script_progression --message="Adding a configuration file..." --time --weight=1
ynh_add_config --template="options.yml" --destination="$final_path/build/config/options.yml" ynh_add_config --template="options.yml" --destination="$final_path/binaries/config/options.yml"
chmod 400 "$final_path/build/config/options.yml" chmod 400 "$final_path/binaries/config/options.yml"
chown $app:$app "$final_path/build/config/options.yml" chown $app:$app "$final_path/binaries/config/options.yml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD

View file

@ -121,8 +121,7 @@ pushd "$final_path"
# Setup node environment # Setup node environment
export NODE_OPTIONS=--max_old_space_size=1024 export NODE_OPTIONS=--max_old_space_size=1024
# Build server from source # Build server from source
ynh_secure_remove --file="$final_path/build" make all install DESTDIR=$final_path/binaries 2>&1
make all install DESTDIR=$final_path/build 2>&1
ynh_secure_remove --file="$final_path/go" ynh_secure_remove --file="$final_path/go"
popd popd
@ -133,7 +132,7 @@ ynh_script_progression --message="Updating data directory..." --time --weight=1
ynh_secure_remove --file="$datadir/assets" ynh_secure_remove --file="$datadir/assets"
mkdir "$datadir/assets/" mkdir "$datadir/assets/"
mv "$final_path/build/assets/"* "$datadir/assets/" mv "$final_path/binaries/assets/"* "$datadir/assets/"
chmod 750 "$datadir" chmod 750 "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
@ -144,9 +143,9 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --time --weight=1 ynh_script_progression --message="Updating a configuration file..." --time --weight=1
ynh_add_config --template="options.yml" --destination="$final_path/build/config/options.yml" ynh_add_config --template="options.yml" --destination="$final_path/binaries/config/options.yml"
chmod 400 "$final_path/build/config/options.yml" chmod 400 "$final_path/binaries/config/options.yml"
chown $app:$app "$final_path/build/config/options.yml" chown $app:$app "$final_path/binaries/config/options.yml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD