1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calckey_ynh.git synced 2024-09-03 18:16:18 +02:00

Merge pull request #7 from YunoHost-Apps/testing

First install
This commit is contained in:
oufmilo 2023-01-06 15:16:53 +01:00 committed by GitHub
commit 89f4f52e3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 32 deletions

View file

@ -13,7 +13,7 @@
upgrade=1
# upgrade=1 from_commit=CommitHash
backup_restore=1
multi_instance=1
multi_instance=0
change_url=0
;;; Options
Email=

View file

@ -1,28 +1,25 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __FINALPATH__/;
proxy_pass http://127.0.0.1:__PORT__;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_redirect off;
### Example PHP configuration (remove it if not used)
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
### End of PHP configuration part
# For WebSocket
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# Cache settings
# proxy_cache cache1;
proxy_cache_lock on;
proxy_cache_use_stale updating;
more_set_headers "X-Cache: $upstream_cache_status";
# Change to upload limit
client_max_body_size 80m;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}

View file

@ -1,5 +1,5 @@
[Unit]
Description=Calckey: A greatly enhanced fork of Misskey with better UI/UX, security, features, and more!
Description=Calckey: fork of Misskey
After=network.target
[Service]

View file

@ -3,8 +3,8 @@
"id": "calckey",
"packaging_format": 1,
"description": {
"en": "A greatly enhanced fork of Misskey with better UI/UX, security, features, and more!",
"fr": "Un fork de Misskey grandement amélioré avec une meilleure interface utilisateur/UX, la sécurité, les fonctionnalités, et plus encore !"
"en": "Fork of Misskey with better UI/UX, security, features",
"fr": "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités"
},
"version": "13.0.5~ynh1",
"url": "https://i.calckey.cloud/",
@ -21,7 +21,7 @@
"requirements": {
"yunohost": ">= 11.0.0"
},
"multi_instance": true,
"multi_instance": false,
"services": [
"nginx"
],

View file

@ -6,10 +6,10 @@
# PHP APP SPECIFIC
#=================================================
NODEJS_VERSION="16.15.0"
NODEJS_VERSION="19"
# dependencies used by the app
pkg_dependencies="ffmpeg postgresql"
pkg_dependencies="ffmpeg postgresql build-essential"
#=================================================
# PERSONAL HELPERS

View file

@ -71,7 +71,9 @@ ynh_app_setting_set --app=$app --key=port --value=$port
ynh_script_progression --message="Installing dependencies..." --weight=3
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
@ -132,8 +134,13 @@ ynh_script_progression --message="Building app..." --weight=15
pushd "$final_path"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all
corepack enable
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run rebuild
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate
popd
#=================================================
@ -141,6 +148,7 @@ popd
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config

View file

@ -137,10 +137,9 @@ ynh_script_progression --message="Building app..."
pushd "$final_path"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cleanall
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn migrate
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run rebuild
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate
popd
#=================================================