Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ee5862aab3 |
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/screenshot1.png
Normal file
BIN
doc/screenshots/screenshot1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 708 KiB |
@ -2,17 +2,21 @@
|
|||||||
|
|
||||||
packaging_format = 2
|
packaging_format = 2
|
||||||
|
|
||||||
id = "custom_nodejs"
|
id = "wikijs"
|
||||||
name = "Custom Node.js"
|
name = "Wiki.js"
|
||||||
description.en = "Deploy a Node.js application (backend/ssr frontend) in Yunohost using a git repo uri"
|
description.en = "Open source powerful wiki app built on Node.js, Git and Markdown"
|
||||||
description.fr = "Wiki open source propulsé par Node.js, Git et Markdown"
|
description.fr = "Wiki open source propulsé par Node.js, Git et Markdown"
|
||||||
|
|
||||||
version = "0.1~ynh1"
|
version = "2.5.303~ynh1"
|
||||||
|
|
||||||
maintainers = ["yeraycat"]
|
maintainers = ["yalh76"]
|
||||||
|
|
||||||
[upstream]
|
[upstream]
|
||||||
code = "https://gitea.brokenlab.xyz/yeray/custom_nodejs_ynh"
|
license = "AGPL-3.0-or-later"
|
||||||
|
website = "https://wiki.js.org/"
|
||||||
|
demo = "https://docs-beta.requarks.io/"
|
||||||
|
userdoc = "https://docs-beta.requarks.io/"
|
||||||
|
code = "https://github.com/Requarks/wiki"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2"
|
yunohost = ">= 11.2"
|
||||||
@ -31,35 +35,32 @@ ram.runtime = "50M"
|
|||||||
[install.domain]
|
[install.domain]
|
||||||
type = "domain"
|
type = "domain"
|
||||||
|
|
||||||
[install.path]
|
|
||||||
type = "path"
|
|
||||||
default = "/node-app"
|
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
type = "group"
|
type = "group"
|
||||||
default = "visitors"
|
default = "visitors"
|
||||||
|
|
||||||
[install.git_url]
|
|
||||||
type = "url"
|
|
||||||
ask.en = "Custom Node.js project's git url"
|
|
||||||
ask.es = "URL de git del proyecto de Node.js personalizado"
|
|
||||||
|
|
||||||
|
|
||||||
[install.database]
|
|
||||||
ask.en = "Do you need a database?"
|
|
||||||
ask.fr = "Avez-vous besoin d'une base de données ?"
|
|
||||||
type = "select"
|
|
||||||
choices = [ "none", "mysql", "postgresql" ]
|
|
||||||
default = "none"
|
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
|
[resources.sources.main]
|
||||||
|
url = "https://github.com/requarks/wiki/releases/download/v2.5.303/wiki-js.tar.gz"
|
||||||
|
sha256 = "269bf80fe95d18fbc9cfef1cc0d86b982f888b9746d143930b924858fc14cef9"
|
||||||
|
|
||||||
|
in_subdir = false
|
||||||
|
|
||||||
|
autoupdate.strategy = "latest_github_release"
|
||||||
|
autoupdate.asset = "wiki-js.tar.gz"
|
||||||
|
|
||||||
|
[resources.ports]
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
main.auth_header = false
|
||||||
|
|
||||||
|
[resources.apt]
|
||||||
|
packages = "postgresql"
|
||||||
|
|
||||||
|
[resources.database]
|
||||||
|
type = "postgresql"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
nodejs_version=20
|
nodejs_version=16
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
@ -28,21 +28,19 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
|
|||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DISABLED: CREATE A POSTGRESQL DATABASE
|
# CREATE A POSTGRESQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Creating a PostgreSQL database..."
|
ynh_script_progression --message="Creating a PostgreSQL database..."
|
||||||
|
|
||||||
# ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..."
|
ynh_script_progression --message="Setting up source files..."
|
||||||
ynh_script_progression --message="Url: $git_url"
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
# ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
|
|
||||||
git clone "$git_url" "$install_dir"
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app:$app" "$install_dir"
|
chown -R "$app:$app" "$install_dir"
|
||||||
@ -50,42 +48,42 @@ chown -R "$app:$app" "$install_dir"
|
|||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Adding a configuration file..."
|
ynh_script_progression --message="Adding a configuration file..."
|
||||||
|
|
||||||
# ynh_add_config --template="config.sample.yml" --destination="$install_dir/config.yml"
|
ynh_add_config --template="config.sample.yml" --destination="$install_dir/config.yml"
|
||||||
|
|
||||||
# chmod 400 "$install_dir/config.yml"
|
chmod 400 "$install_dir/config.yml"
|
||||||
# chown "$app:$app" "$install_dir/config.yml"
|
chown "$app:$app" "$install_dir/config.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# # Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
# ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# # Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
# ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
# yunohost service add "$app" --description="$app daemon for Custom Node.js App" --log="/var/log/$app/$app.log"
|
yunohost service add "$app" --description="$app daemon for Wiki.js" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE LDAP USER
|
# CREATE LDAP USER
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Creating LDAP user..."
|
ynh_script_progression --message="Creating LDAP user..."
|
||||||
|
|
||||||
# yunohost user create "$ldap_user" --fullname "SvcWikijsLdap" --domain "$domain" --password "$ldap_password" -q 0
|
yunohost user create "$ldap_user" --fullname "SvcWikijsLdap" --domain "$domain" --password "$ldap_password" -q 0
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Starting a systemd service..."
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
# ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="HTTP Server:"
|
ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="HTTP Server:"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# ynh_script_progression --message="Installation of $app completed"
|
ynh_script_progression --message="Installation of $app completed"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user