1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snserver_ynh.git synced 2024-09-03 20:26:22 +02:00

Merge pull request #22 from YunoHost-Apps/fix_ynh_4.2

Fix for ynh 4.2
This commit is contained in:
Fabian Wilkens 2021-05-12 04:26:11 +02:00 committed by GitHub
commit 453b4afdab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 222 additions and 108 deletions

56
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,56 @@
---
name: Bug report
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
---
**How to post a meaningful bug report**
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
### Describe the bug
*A clear and concise description of what the bug is.*
### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
### Steps to reproduce
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install the_app
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
1. *Go to '...'*
2. *Click on '...'*
3. *Scroll down to '...'*
4. *See error*
### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
### Logs
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

17
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,17 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

124
README.md
View file

@ -1,78 +1,60 @@
# Standard Notes Syncing Server for YunoHost
[![Integration level](https://dash.yunohost.org/integration/snserver.svg)](https://dash.yunohost.org/appci/app/snserver)
![Status](https://ci-apps.yunohost.org/ci/badges/snserver.status.svg)
![Maintained](https://ci-apps.yunohost.org/ci/badges/snserver.maintain.svg)
[![Install SNServer with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=snserver)
> *This package allow you to install snserver quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
## Overview
Standard Notes syncing server
You can run your own Standard Notes server and use it with any Standard Notes app. This allows you to have 100% control of your data.
**Shipped version:** 3.22.8
* Apps available for free. https://standardnotes.org/
* Desktop (Windows, Mac, Linux)
* Mobile (Android and iOS)
* Web https://app.standardnotes.org/
* Self-Hosted Yunohost - Web-App https://github.com/YunoHost-Apps/snweb_ynh
> Change Sync Server Domain during Registation and Sign in
## Screenshots
![](https://camo.githubusercontent.com/ca3744729c6c33f2f42d7917a4e7167c12a786615e14d1719f7d1ec6ed77aae8/68747470733a2f2f7374616e646172646e6f7465732e6f72672f6173736574732f686f6d65706167652d6865726f2e706e67)
Extensions, Editors, Themes: https://standardnotes.org/extensions
## Demo
* [Official demo - Web App](https://standardnotes.org/demo)
## Configuration
How to configure this app:
* The config-file is stored under "/opt/yunohost/$app/live/.env"
* You can find additional config features under https://your-domain.tld/yunohost/admin/#/apps/$app/config-panel
## Documentation
* Official documentation: https://docs.standardnotes.org
## YunoHost specific features
#### Multi-users support
* Are LDAP and HTTP auth supported? LDAP=No HTTP=Yes
* Can the app be used by multiple users? Yes
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/snserver.svg)](https://ci-apps.yunohost.org/ci/apps/snserver/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/snserver.svg)](https://ci-apps-arm.yunohost.org/ci/apps/snserver/)
## Limitations
* If users have installed the extensions included in this package. The URL of the server should not be changed anymore. Otherwise the users will have to reinstall the extensions.
## Links
* Report a bug: https://github.com/YunoHost-Apps/snserver_ynh/issues
* App website: https://standardnotes.org/
* Upstream app repository: https://github.com/standardnotes/syncing-server
* YunoHost website: https://yunohost.org/
--- ---
Developers info <!--
---------------- N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
**Only if you want to use a testing branch for coding, instead of merging directly into master.** # Standard Notes Server for YunoHost
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/snserver_ynh/tree/testing).
[![Integration level](https://dash.yunohost.org/integration/snserver.svg)](https://dash.yunohost.org/appci/app/snserver) ![](https://ci-apps.yunohost.org/ci/badges/snserver.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/snserver.maintain.svg)
[![Install snserver with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=snserver)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install snserver quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview
The Standard Notes syncing server. An end-to-end encrypted note-taking app.
**Shipped version:** 3.22.8~ynh2
**Demo:** https://standardnotes.org/demo
## Disclaimers / important information
* Any known limitations, constrains or stuff not working, such as (but not limited to):
* No single-sign on or LDAP integration
* The app requires up 600MB of RAM to install
* The app requires at least 110MB of RAM to work properly. And will increase with use.
* The app requires around 300MB of disk.
* Other infos that people should be aware of, such as:
* The config-file is stored under "/opt/yunohost/$app/live/.env"
* You can find additional config features under https://your-domain.tld/yunohost/admin/#/apps/$app/config-panel
* You can change the url of this app, but than all useres have to reinstall the extensions.
## Documentation and resources
* Official app website: https://standardnotes.org/
* Official user documentation: https://docs.standardnotes.org/
* Official admin documentation: https://docs.standardnotes.org/
* Upstream app code repository: https://github.com/standardnotes/syncing-server
* YunoHost documentation for this app: https://yunohost.org/app_snserver
* Report a bug: https://github.com/YunoHost-Apps/snserver_ynh/issues
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/snserver_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
``` ```
@ -80,3 +62,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/snserver_ynh/tree/tes
or or
sudo yunohost app upgrade snserver -u https://github.com/YunoHost-Apps/snserver_ynh/tree/testing --debug sudo yunohost app upgrade snserver -u https://github.com/YunoHost-Apps/snserver_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

58
README_fr.md Normal file
View file

@ -0,0 +1,58 @@
# Standard Notes Server pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/snserver.svg)](https://dash.yunohost.org/appci/app/snserver) ![](https://ci-apps.yunohost.org/ci/badges/snserver.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/snserver.maintain.svg)
[![Installer snserver avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=snserver)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install snserver quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Vue d'ensemble
**Version incluse:** 3.22.8~ynh2
**Démo:** https://standardnotes.org/demo
## Avertissements / informations importantes
* Any known limitations, constrains or stuff not working, such as (but not limited to):
* No single-sign on or LDAP integration
* The app requires up 600MB of RAM to install
* The app requires at least 110MB of RAM to work properly. And will increase with use.
* The app requires around 300MB of disk.
* Other infos that people should be aware of, such as:
* The config-file is stored under "/opt/yunohost/$app/live/.env"
* You can find additional config features under https://your-domain.tld/yunohost/admin/#/apps/$app/config-panel
* You can change the url of this app, but than all useres have to reinstall the extensions.
## Documentations et ressources
* Site official de l'app : https://standardnotes.org/
* Documentation officielle utilisateur: https://docs.standardnotes.org/
* Documentation officielle de l'admin: https://docs.standardnotes.org/
* Dépôt de code officiel de l'app: https://github.com/standardnotes/syncing-server
* Documentation YunoHost pour cette app: https://yunohost.org/app_snserver
* Signaler un bug: https://github.com/YunoHost-Apps/snserver_ynh/issues
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/snserver_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
sudo yunohost app install https://github.com/YunoHost-Apps/snserver_ynh/tree/testing --debug
or
sudo yunohost app upgrade snserver -u https://github.com/YunoHost-Apps/snserver_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications:** https://yunohost.org/packaging_apps

View file

@ -17,8 +17,10 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 3.22.8~yhn1
#upgrade=1 from_commit=c9ea83e8102affd5ca74a6d438920fa40af4a63e
# 3.20.5~ynh2 # 3.20.5~ynh2
upgrade=1 from_commit=e8db15c97db16f68d6453970a9dff74d5136017b #upgrade=1 from_commit=e8db15c97db16f68d6453970a9dff74d5136017b
# 3.13.6~ynh4 # 3.13.6~ynh4
#upgrade=1 from_commit=bdb0c5049c8eacbef68059d2821353d0e0345290 #upgrade=1 from_commit=bdb0c5049c8eacbef68059d2821353d0e0345290
# 3.13.6~ynh2 # 3.13.6~ynh2
@ -38,6 +40,9 @@
Email= Email=
Notification= Notification=
;;; Upgrade options ;;; Upgrade options
; commit=c9ea83e8102affd5ca74a6d438920fa40af4a63e
name=3.22.8~ynh1
manifest_arg=domain=DOMAIN&path=PATH&is_public=1
; commit=e8db15c97db16f68d6453970a9dff74d5136017b ; commit=e8db15c97db16f68d6453970a9dff74d5136017b
name=3.20.5~ynh2 name=3.20.5~ynh2
manifest_arg=domain=DOMAIN&path=PATH&is_public=1 manifest_arg=domain=DOMAIN&path=PATH&is_public=1

View file

@ -9,9 +9,9 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/live WorkingDirectory=__FINALPATH__/live
Environment=RAILS_ENV=production Environment="RAILS_ENV=production"
Environment="PORT=__PORT__" Environment="PORT=__PORT__"
ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec rails server ExecStart=__RBENV_INSTALL_DIR__/versions/__APP__/bin/bundle exec rails server
ExecReload=/bin/kill -SIGUSR1 $MAINPID ExecReload=/bin/kill -SIGUSR1 $MAINPID
StandardOutput=append:/var/log/__APP__/__APP__.log StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=append:/var/log/__APP__/__APP__.log StandardError=append:/var/log/__APP__/__APP__.log

0
doc/.gitkeep Normal file
View file

10
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,10 @@
* Any known limitations, constrains or stuff not working, such as (but not limited to):
* No single-sign on or LDAP integration
* The app requires up 600MB of RAM to install
* The app requires at least 110MB of RAM to work properly. And will increase with use.
* The app requires around 300MB of disk.
* Other infos that people should be aware of, such as:
* The config-file is stored under "/opt/yunohost/$app/live/.env"
* You can find additional config features under https://your-domain.tld/yunohost/admin/#/apps/$app/config-panel
* You can change the url of this app, but than all useres have to reinstall the extensions.

0
doc/screenshots/.gitkeep Normal file
View file

View file

@ -5,15 +5,23 @@
"description": { "description": {
"en": "The Standard Notes syncing server. An end-to-end encrypted note-taking app." "en": "The Standard Notes syncing server. An end-to-end encrypted note-taking app."
}, },
"version": "3.22.8~ynh1", "version": "3.22.8~ynh2",
"url": "https://github.com/standardnotes/syncing-server", "url": "https://github.com/standardnotes/syncing-server",
"upstream": {
"license": "AGPL-3.0-or-later",
"website": "https://standardnotes.org/",
"demo": "https://standardnotes.org/demo",
"admindoc": "https://docs.standardnotes.org/",
"userdoc": "https://docs.standardnotes.org/",
"code": "https://github.com/standardnotes/syncing-server"
},
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {
"name": "Fabian Wilkens", "name": "Fabian Wilkens",
"email": "46000361+FabianWilkens@users.noreply.github.com" "email": "46000361+FabianWilkens@users.noreply.github.com"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.1.7" "yunohost": ">= 4.2.4"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [

View file

@ -3,7 +3,7 @@
#================================================= #=================================================
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
RUBY_VERSION="2.7.2" RUBY_VERSION="2.7.3"
# dependencies used by the app # dependencies used by the app
pkg_dependencies="\ pkg_dependencies="\

View file

@ -97,10 +97,7 @@ then
domain="$old_domain" domain="$old_domain"
path_url="$new_path" path_url="$new_path"
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config "\ ynh_add_nginx_config
port \
access_domain\
"
fi fi
# Change the domain for nginx # Change the domain for nginx
@ -154,10 +151,7 @@ domain=$new_domain
path_url=$new_path path_url=$new_path
# Create a dedicated fail2ban config # Create a dedicated fail2ban config
touch "/var/log/$app/$app.log" touch "/var/log/$app/$app.log"
ynh_add_fail2ban_config --use_template --others_var="\ ynh_add_fail2ban_config --use_template
domain \
path_url \
"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION

View file

@ -105,10 +105,7 @@ ynh_setup_source --dest_dir="$final_path/live"
ynh_script_progression --message="Configuring nginx web server..." --weight=3 ynh_script_progression --message="Configuring nginx web server..." --weight=3
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config "\ ynh_add_nginx_config
port \
access_domain \
"
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -210,10 +207,7 @@ done
ynh_script_progression --message="Configuring a systemd service..." --weight=4 ynh_script_progression --message="Configuring a systemd service..." --weight=4
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config --others_var="\ ynh_add_systemd_config
port \
RBENV_ROOT \
"
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM
@ -268,10 +262,7 @@ ynh_script_progression --message="Configuring fail2ban..." --weight=1
# Create a dedicated fail2ban config # Create a dedicated fail2ban config
touch "/var/log/$app/$app.log" touch "/var/log/$app/$app.log"
ynh_add_fail2ban_config --use_template --others_var="\ ynh_add_fail2ban_config --use_template
domain \
path_url \
"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT

View file

@ -204,10 +204,7 @@ fi
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config "\ ynh_add_nginx_config
port \
access_domain \
"
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
@ -310,10 +307,7 @@ done
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config --others_var="\ ynh_add_systemd_config
port \
RBENV_ROOT \
"
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM
@ -365,10 +359,7 @@ ynh_script_progression --message="Reconfiguring fail2ban..." --weight=1
# Create a dedicated fail2ban config # Create a dedicated fail2ban config
touch "/var/log/$app/$app.log" touch "/var/log/$app/$app.log"
ynh_add_fail2ban_config --use_template --others_var="\ ynh_add_fail2ban_config --use_template
domain \
path_url \
"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE