This commit is contained in:
eric_G 2025-04-01 23:30:20 +02:00
parent 5e7987c756
commit aef113307b
5 changed files with 11 additions and 4 deletions

6
conf/.env Normal file
View File

@ -0,0 +1,6 @@
NODE_ENV=production
BASE_URL=https://__DOMAIN__
IP_ADDRESS=127.0.0.7
PORT=__PORT__
REDIS_DB=__REDIS_DB__
FILE_DIR=__DATA_DIR__

View File

@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/
Environment="NODE_ENV=production"
EnvironmentFile=__INSTALL_DIR__/.env
Environment="PATH=__PATH_WITH_NODEJS__"
ExecStart=__NODEJS_DIR__/node __INSTALL_DIR__/server/bin/prod.js
Restart=always

View File

@ -24,6 +24,7 @@ architectures = ["amd64", "arm64", "armhf"]
multi_instance = true
ldap = false
sso = false
disk = "50M"

View File

@ -43,7 +43,7 @@ yunohost service add "$app" --description="Simple, private file sharing" --log="
#=================================================
ynh_script_progression "Adding $app's configuration..."
ynh_config_add --template="config.js" --destination="$install_dir/server/config.js"
ynh_config_add --template=".env" --destination="$install_dir/.env"
#=================================================
# BUILD APP

View File

@ -22,7 +22,7 @@ ynh_config_remove_logrotate
#=================================================
ynh_script_progression "Upgrading source files..."
ynh_setup_source --dest_dir="$install_dir" --keep="server/config.js" --full_replace
ynh_setup_source --dest_dir="$install_dir" --keep=".env" --full_replace
chmod +x "$install_dir/server/bin/prod.js"
@ -49,7 +49,7 @@ yunohost service add "$app" --description="Simple, private file sharing" --log="
#=================================================
ynh_script_progression "Updating configuration..."
ynh_config_add --template="config.js" --destination="$install_dir/server/config.js"
ynh_config_add --template=".env" --destination="$install_dir/.env"
#=================================================
# BUILD APP