mirror of
https://github.com/YunoHost-Apps/send_ynh.git
synced 2025-11-05 08:15:29 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5cdfab3e5 | ||
|
|
3e33afe719 | ||
|
|
396b5699a7 | ||
|
|
ac39aded73 | ||
|
|
6f3e883927 | ||
|
|
aef113307b |
@@ -12,17 +12,13 @@ File sharing which allows to send encrypted files
|
|||||||
|
|
||||||
[](https://send.vis.ee/)
|
[](https://send.vis.ee/)
|
||||||
[](https://send.vis.ee/)
|
[](https://send.vis.ee/)
|
||||||
[?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/send/)
|
[?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/send/)
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://apps.yunohost.org/app/send"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
|
<a href="https://apps.yunohost.org/app/send"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
|
||||||
<a href="https://github.com/YunoHost-Apps/send_ynh/issues"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_report_an_issue.svg"/></a>
|
<a href="https://github.com/YunoHost-Apps/send_ynh/issues"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_report_an_issue.svg"/></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||

|
|
||||||
|
|
||||||
## 📦 Developer info
|
## 📦 Developer info
|
||||||
|
|
||||||
[](https://ci-apps.yunohost.org/ci/apps/send/)
|
[](https://ci-apps.yunohost.org/ci/apps/send/)
|
||||||
|
|||||||
6
conf/.env
Normal file
6
conf/.env
Normal 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__
|
||||||
@@ -7,7 +7,7 @@ Type=simple
|
|||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__INSTALL_DIR__/
|
WorkingDirectory=__INSTALL_DIR__/
|
||||||
Environment="NODE_ENV=production"
|
EnvironmentFile=__INSTALL_DIR__/.env
|
||||||
Environment="PATH=__PATH_WITH_NODEJS__"
|
Environment="PATH=__PATH_WITH_NODEJS__"
|
||||||
ExecStart=__NODEJS_DIR__/node __INSTALL_DIR__/server/bin/prod.js
|
ExecStart=__NODEJS_DIR__/node __INSTALL_DIR__/server/bin/prod.js
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ name = "Send"
|
|||||||
description.en = "File sharing which allows to send encrypted files"
|
description.en = "File sharing which allows to send encrypted files"
|
||||||
description.fr = "Partage de fichiers qui permet d'envoyer des fichiers chiffrés"
|
description.fr = "Partage de fichiers qui permet d'envoyer des fichiers chiffrés"
|
||||||
|
|
||||||
version = "3.4.27~ynh1"
|
version = "3.4.25~ynh1"
|
||||||
|
|
||||||
maintainers = []
|
maintainers = []
|
||||||
|
|
||||||
@@ -18,12 +18,13 @@ demo = "https://send.vis.ee/"
|
|||||||
code = "https://github.com/timvisee/send"
|
code = "https://github.com/timvisee/send"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 12.1.17"
|
yunohost = ">= 12.0.9"
|
||||||
helpers_version = "2.1"
|
helpers_version = "2.1"
|
||||||
architectures = ["amd64", "arm64", "armhf"]
|
architectures = ["amd64", "arm64", "armhf"]
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
|
|
||||||
ldap = false
|
ldap = false
|
||||||
|
|
||||||
sso = false
|
sso = false
|
||||||
|
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
@@ -42,8 +43,8 @@ ram.runtime = "50M"
|
|||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/timvisee/send/archive/refs/tags/v3.4.27.tar.gz"
|
url = "https://github.com/timvisee/send/archive/refs/tags/v3.4.25.tar.gz"
|
||||||
sha256 = "fda2db869f3affbaf1fa025501c8b32b92cd85d350a1424b20db7f9164dce301"
|
sha256 = "826224832ac8facdd368f9960d99afdef0a549d92b003af1d93bc271b6fa036a"
|
||||||
autoupdate.strategy = "latest_github_tag"
|
autoupdate.strategy = "latest_github_tag"
|
||||||
|
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
@@ -52,6 +53,8 @@ ram.runtime = "50M"
|
|||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
|
[resources.data_dir]
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
main.additional_urls = ["/api/upload"]
|
main.additional_urls = ["/api/upload"]
|
||||||
@@ -70,6 +73,3 @@ ram.runtime = "50M"
|
|||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "redis-server"
|
packages = "redis-server"
|
||||||
|
|
||||||
[resources.nodejs]
|
|
||||||
version = "16"
|
|
||||||
|
|||||||
7
scripts/_common.sh
Normal file
7
scripts/_common.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# COMMON VARIABLES AND CUSTOM HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
nodejs_version="16"
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
ynh_print_info "Declaring files to be backed up..."
|
ynh_print_info "Declaring files to be backed up..."
|
||||||
@@ -10,6 +11,12 @@ ynh_print_info "Declaring files to be backed up..."
|
|||||||
|
|
||||||
ynh_backup "$install_dir"
|
ynh_backup "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup "$data_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression "Installing dependencies..."
|
||||||
|
|
||||||
|
ynh_nodejs_install
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A REDIS DATABASE
|
# CREATE A REDIS DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
@@ -35,7 +43,7 @@ yunohost service add "$app" --description="Simple, private file sharing" --log="
|
|||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Adding $app's configuration..."
|
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
|
# BUILD APP
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
@@ -17,6 +18,8 @@ ynh_redis_remove_db "$redis_db"
|
|||||||
|
|
||||||
ynh_config_remove_nginx
|
ynh_config_remove_nginx
|
||||||
|
|
||||||
|
ynh_nodejs_remove
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
@@ -11,11 +12,20 @@ ynh_restore "$install_dir"
|
|||||||
|
|
||||||
chmod +x "$install_dir/server/bin/prod.js"
|
chmod +x "$install_dir/server/bin/prod.js"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE DATA DIRECTORY
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression "Restoring the data directory..."
|
||||||
|
|
||||||
|
ynh_restore "$data_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Reinstalling dependencies..."
|
ynh_script_progression "Reinstalling dependencies..."
|
||||||
|
|
||||||
|
ynh_nodejs_install
|
||||||
|
|
||||||
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
ynh_restore "/etc/systemd/system/$app.service"
|
ynh_restore "/etc/systemd/system/$app.service"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
@@ -21,10 +22,17 @@ ynh_config_remove_logrotate
|
|||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Upgrading source files..."
|
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"
|
chmod +x "$install_dir/server/bin/prod.js"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression "Upgrading dependencies..."
|
||||||
|
|
||||||
|
ynh_nodejs_install
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
@@ -41,7 +49,7 @@ yunohost service add "$app" --description="Simple, private file sharing" --log="
|
|||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Updating configuration..."
|
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
|
# BUILD APP
|
||||||
|
|||||||
Reference in New Issue
Block a user