1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fittrackee_ynh.git synced 2024-09-03 18:36:16 +02:00
This commit is contained in:
Éric Gaspar 2023-01-17 22:07:41 +01:00
parent 434e4ba286
commit b29dfb820f
3 changed files with 16 additions and 17 deletions

View file

@ -15,7 +15,7 @@ DEFAULT_LANGUAGE="English"
## Leave unset to allow all hosts ## Leave unset to allow all hosts
ALLOWED_HOSTS="localhost,127.0.0.1,[::1]" ALLOWED_HOSTS="localhost,127.0.0.1,[::1]"
MEDIA_ROOT=__DATADIR__/images/ MEDIA_ROOT=images/
# Database configuration # Database configuration
PGPORT=5432 PGPORT=5432

View file

@ -8,7 +8,7 @@ location __PATH__/ {
} }
location /images/ { location /images/ {
alias __DATADIR__/images/; alias __FINALPATH__/images/;
} }
location /static/ { location /static/ {

View file

@ -106,21 +106,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# CREATE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Creating a data directory..." --weight=1
datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
mkdir -p $datadir
mkdir -p $datadir/images
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#================================================= #=================================================
# CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES # CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES
#================================================= #=================================================
@ -159,6 +144,20 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Creating a data directory..." --weight=1
datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================