mirror of
https://github.com/YunoHost-Apps/snweb_ynh.git
synced 2024-09-03 20:26:22 +02:00
Fix: modify ynh package for new upstream app source
This commit is contained in:
parent
40d878069f
commit
b5e262762e
10 changed files with 28 additions and 79 deletions
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/standardnotes/app/archive/refs/tags/3.20.2.tar.gz
|
SOURCE_URL=https://github.com/standardnotes/app/archive/refs/tags/@standardnotes/web@3.39.1.tar.gz
|
||||||
SOURCE_SUM=6EE98FA8CEDCC7743419ED528E0A5B5AF5253373895AEC3E87EFFCA7D150122B
|
SOURCE_SUM=1dc84e151c20f5a31cf8b6f9c1248b14d2f72800f58557ddb8fe8ee54d360c58
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,33 +1,15 @@
|
||||||
RAILS_ENV=production
|
RAILS_ENV=production
|
||||||
PORT=__PORT__
|
PORT=__PORT__
|
||||||
WEB_CONCURRENCY=0
|
|
||||||
RAILS_LOG_TO_STDOUT=true
|
|
||||||
|
|
||||||
# Log Level options: "INFO" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "FATAL"
|
|
||||||
RAILS_LOG_LEVEL=INFO
|
|
||||||
|
|
||||||
RAILS_SERVE_STATIC_FILES=true
|
|
||||||
SECRET_KEY_BASE=__SECRET_KEY_BASE__
|
|
||||||
|
|
||||||
APP_HOST=http://__DOMAIN____PATH__/
|
|
||||||
PURCHASE_URL=https://standardnotes.com/purchase
|
|
||||||
PLANS_URL=https://standardnotes.com/plans
|
|
||||||
DASHBOARD_URL=http://standardnotes.com/dashboard
|
|
||||||
DEFAULT_SYNC_SERVER=https://__SNSERVER_DOMAIN__/
|
DEFAULT_SYNC_SERVER=https://__SNSERVER_DOMAIN__/
|
||||||
WEBSOCKET_URL=wss://sockets-dev.standardnotes.com
|
|
||||||
|
|
||||||
ENABLE_UNFINISHED_FEATURES=false
|
# Subscription related endpoints
|
||||||
|
DASHBOARD_URL=http://standardnotes.com/dashboard
|
||||||
|
PLANS_URL=https://standardnotes.com/plans
|
||||||
|
PURCHASE_URL=https://standardnotes.com/purchase
|
||||||
|
|
||||||
# NewRelic (Optional)
|
# Used by Rails internals and not Standard Notes related
|
||||||
NEW_RELIC_ENABLED=false
|
SECRET_KEY_BASE=__SECRET_KEY_BASE__
|
||||||
NEW_RELIC_THREAD_PROFILER_ENABLED=false
|
|
||||||
NEW_RELIC_LICENSE_KEY=
|
|
||||||
NEW_RELIC_APP_NAME=Web
|
|
||||||
NEW_RELIC_BROWSER_MONITORING_AUTO_INSTRUMENT=false
|
|
||||||
|
|
||||||
DEV_ACCOUNT_EMAIL=
|
|
||||||
DEV_ACCOUNT_PASSWORD=
|
|
||||||
DEV_ACCOUNT_SERVER=
|
|
||||||
|
|
||||||
# Sub-URI
|
# Sub-URI
|
||||||
RAILS_RELATIVE_URL_ROOT=__PATH__/
|
RAILS_RELATIVE_URL_ROOT=__PATH__/
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/live/public ;
|
alias __FINALPATH__/live/packages/web-server/public ;
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||||
client_max_body_size 25M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT____PATH__/;
|
proxy_pass http://127.0.0.1:__PORT____PATH__/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
|
@ -7,8 +7,8 @@ Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
EnvironmentFile=__FINALPATH__/live/.env
|
EnvironmentFile=__FINALPATH__/live/.env
|
||||||
WorkingDirectory=__FINALPATH__/live/
|
WorkingDirectory=__FINALPATH__/live/packages/web-server/
|
||||||
ExecStart=__RBENV_INSTALL_DIR__/versions/__APP__/bin/bundle exec puma -C config/puma.rb -p __PORT__ -e production
|
ExecStart=__RBENV_INSTALL_DIR__/versions/__APP__/bin/bundle exec rails s -b 0.0.0.0 -p __PORT__ -e production
|
||||||
StandardOutput=append:/var/log/__APP__/snweb.log
|
StandardOutput=append:/var/log/__APP__/snweb.log
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
* No single-sign on or LDAP integration
|
* No single-sign on or LDAP integration
|
||||||
* The app requires up 1500MB of RAM to install
|
* The app requires up 1500MB of RAM to install
|
||||||
* The app requires at least 80MB of RAM to work properly.
|
* The app requires at least 100MB of RAM to work properly.
|
||||||
* The app requires around 1000MB of disk.
|
* The app requires around 3500MB of disk.
|
||||||
|
|
||||||
* A dedicated domain is requierd if you want to use extensions.
|
* A dedicated domain is requierd if you want to use extensions.
|
||||||
* notes.your-domain.tld/ -> Extension Manager is working
|
* notes.your-domain.tld/ -> Extensions are working
|
||||||
* your-domain.tld/notes/ -> Extension Manager is not working
|
* your-domain.tld/notes/ -> Extensions are not working
|
||||||
|
|
||||||
* The config-file is stored under "/opt/yunohost/$app/live/.env"
|
* The config-file is stored under "/opt/yunohost/$app/live/.env"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "End-to-end encrypted note-taking app",
|
"en": "End-to-end encrypted note-taking app",
|
||||||
"fr": "Application de prise de notes chiffrées"
|
"fr": "Application de prise de notes chiffrées"
|
||||||
},
|
},
|
||||||
"version": "3.20.2~ynh1",
|
"version": "3.39.1~ynh1",
|
||||||
"url": "https://github.com/standardnotes/web",
|
"url": "https://github.com/standardnotes/web",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
"en": "Choose the default Standard Notes Syncing Server",
|
"en": "Choose the default Standard Notes Syncing Server",
|
||||||
"de": "Wähle den Standard Notes Syncing Server"
|
"de": "Wähle den Standard Notes Syncing Server"
|
||||||
},
|
},
|
||||||
"default": "sync.standardnotes.org"
|
"default": "api.standardnotes.org"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,19 +6,11 @@
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="\
|
pkg_dependencies="\
|
||||||
zlib1g-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libjemalloc-dev \
|
|
||||||
python2-minimal \
|
|
||||||
git \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
RUBY_VERSION="2.7.3"
|
RUBY_VERSION="2.7.4"
|
||||||
NODEJS_VERSION="16"
|
NODEJS_VERSION="16"
|
||||||
|
|
||||||
SOURCE="https://github.com/standardnotes/web"
|
|
||||||
COMMIT="4d581feb0ac862e5face27be3fd52ac39f565d23"
|
|
||||||
|
|
||||||
node_max_old_space_size=2048
|
node_max_old_space_size=2048
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -96,14 +96,6 @@ chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app: "$final_path"
|
chown -R $app: "$final_path"
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
mkdir -p "$final_path/live/log"
|
|
||||||
chown -R $app: "$final_path/live/log"
|
|
||||||
mkdir -p "$final_path/live/public"
|
|
||||||
chown -R $app: "$final_path/live/public"
|
|
||||||
mkdir -p "$final_path/live/tmp"
|
|
||||||
chown -R $app: "$final_path/live/tmp"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -146,13 +138,9 @@ chown -R $app: "$final_path"
|
||||||
|
|
||||||
pushd "$final_path/live"
|
pushd "$final_path/live"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_as $app $ynh_ruby_load_path bin/bundle config set --local path 'vendor/bundle'
|
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install
|
||||||
ynh_exec_as $app $ynh_ruby_load_path bin/bundle config set with 'development'
|
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build:web-server
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle update -j$(getconf _NPROCESSORS_ONLN) --quiet
|
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build:web
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --quiet
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install --pure-lockfile
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn bundle
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle exec rails assets:precompile --quiet
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -174,7 +162,6 @@ mkdir -p "/var/log/$app"
|
||||||
chown -R $app: "/var/log/$app"
|
chown -R $app: "/var/log/$app"
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate --logfile="$final_path/live/log/production.log"
|
|
||||||
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -107,13 +107,6 @@ chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app: "$final_path"
|
chown -R $app: "$final_path"
|
||||||
|
|
||||||
mkdir -p "$final_path/live/log"
|
|
||||||
chown -R $app: "$final_path/live/log"
|
|
||||||
mkdir -p "$final_path/live/public"
|
|
||||||
chown -R $app: "$final_path/live/public"
|
|
||||||
mkdir -p "$final_path/live/tmp"
|
|
||||||
chown -R $app: "$final_path/live/tmp"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -165,13 +158,9 @@ then
|
||||||
|
|
||||||
pushd "$final_path/live"
|
pushd "$final_path/live"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_as $app $ynh_ruby_load_path bin/bundle config set --local path 'vendor/bundle'
|
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install
|
||||||
ynh_exec_as $app $ynh_ruby_load_path bin/bundle config set with 'development'
|
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build:web-server
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle update -j$(getconf _NPROCESSORS_ONLN) --quiet
|
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn build:web
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --quiet
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn install --pure-lockfile
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env NODE_OPTIONS="--max-old-space-size=$node_max_old_space_size" PATH=$ynh_node_load_PATH yarn bundle
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle exec rails assets:precompile --quiet
|
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -194,7 +183,6 @@ mkdir -p "/var/log/$app"
|
||||||
chown -R $app: "/var/log/$app"
|
chown -R $app: "/var/log/$app"
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate --logfile="$final_path/live/log/production.log"
|
|
||||||
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/config.ru b/config.ru
|
diff --git a/packages/web-server/config.ru b/packages/web-server/config.ru
|
||||||
index bd83b25..6b1bb50 100644
|
index bd83b25..6b1bb50 100644
|
||||||
--- a/config.ru
|
--- a/packages/web-server/config.ru
|
||||||
+++ b/config.ru
|
+++ b/packages/web-server/config.ru
|
||||||
@@ -1,4 +1,6 @@
|
@@ -1,4 +1,6 @@
|
||||||
# This file is used by Rack-based servers to start the application.
|
# This file is used by Rack-based servers to start the application.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue