mirror of
https://github.com/YunoHost-Apps/calckey_ynh.git
synced 2024-09-03 18:16:18 +02:00
commit
89f4f52e3c
7 changed files with 36 additions and 32 deletions
|
@ -13,7 +13,7 @@
|
||||||
upgrade=1
|
upgrade=1
|
||||||
# upgrade=1 from_commit=CommitHash
|
# upgrade=1 from_commit=CommitHash
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=0
|
||||||
change_url=0
|
change_url=0
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -1,28 +1,25 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Path to source
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
alias __FINALPATH__/;
|
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)
|
# For WebSocket
|
||||||
index index.php;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
# 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
|
|
||||||
|
|
||||||
|
# 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 SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[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
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"id": "calckey",
|
"id": "calckey",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A greatly enhanced fork of Misskey with better UI/UX, security, features, and more!",
|
"en": "Fork of Misskey with better UI/UX, security, features",
|
||||||
"fr": "Un fork de Misskey grandement amélioré avec une meilleure interface utilisateur/UX, la sécurité, les fonctionnalités, et plus encore !"
|
"fr": "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités"
|
||||||
},
|
},
|
||||||
"version": "13.0.5~ynh1",
|
"version": "13.0.5~ynh1",
|
||||||
"url": "https://i.calckey.cloud/",
|
"url": "https://i.calckey.cloud/",
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 11.0.0"
|
"yunohost": ">= 11.0.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx"
|
"nginx"
|
||||||
],
|
],
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
# PHP APP SPECIFIC
|
# PHP APP SPECIFIC
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
NODEJS_VERSION="16.15.0"
|
NODEJS_VERSION="19"
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="ffmpeg postgresql"
|
pkg_dependencies="ffmpeg postgresql build-essential"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -71,7 +71,9 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
ynh_script_progression --message="Installing dependencies..." --weight=3
|
ynh_script_progression --message="Installing dependencies..." --weight=3
|
||||||
|
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
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"
|
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"
|
pushd "$final_path"
|
||||||
ynh_use_nodejs
|
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 clean-all
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init
|
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
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -141,6 +148,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||||
|
|
||||||
|
env_path="$PATH"
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
|
|
@ -137,10 +137,9 @@ ynh_script_progression --message="Building app..."
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
ynh_use_nodejs
|
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 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 run rebuild
|
||||||
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 migrate
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue