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

Merge pull request #43 from YunoHost-Apps/testing

Testing
This commit is contained in:
Alexandre Aubin 2024-08-05 18:43:24 +02:00 committed by GitHub
commit 2aa237f096
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 112 additions and 46 deletions

View file

@ -5,4 +5,5 @@
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Coin for YunoHost
[![Integration level](https://dash.yunohost.org/integration/coin.svg)](https://dash.yunohost.org/appci/app/coin) ![Working status](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![Working status](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Install Coin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
@ -30,7 +30,7 @@ COIN is an Information System designed for associative ISPs in the FFDN.
- Optional features: mailing list, hardware provisionning
**Shipped version:** 20231216~ynh1
**Shipped version:** 20231216~ynh2
## Screenshots

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# Coin para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/coin.svg)](https://dash.yunohost.org/appci/app/coin) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Instalar Coin con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
@ -30,7 +30,7 @@ COIN is an Information System designed for associative ISPs in the FFDN.
- Optional features: mailing list, hardware provisionning
**Versión actual:** 20231216~ynh1
**Versión actual:** 20231216~ynh2
## Capturas

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# Coin YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/coin.svg)](https://dash.yunohost.org/appci/app/coin) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Integrazio maila](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Instalatu Coin YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
@ -30,7 +30,7 @@ COIN is an Information System designed for associative ISPs in the FFDN.
- Optional features: mailing list, hardware provisionning
**Paketatutako bertsioa:** 20231216~ynh1
**Paketatutako bertsioa:** 20231216~ynh2
## Pantaila-argazkiak

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Coin pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/coin.svg)](https://dash.yunohost.org/appci/app/coin) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Niveau dintégration](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Installer Coin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
@ -30,7 +30,7 @@ COIN est un système d'information pour FAI associatif dans la FFDN
- Optionnel : gestion de mailing liste, prêt de matériel
**Version incluse:** 20231216~ynh1
**Version incluse:** 20231216~ynh2
## Captures décran

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Coin para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/coin.svg)](https://dash.yunohost.org/appci/app/coin) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Instalar Coin con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
@ -30,7 +30,7 @@ COIN is an Information System designed for associative ISPs in the FFDN.
- Optional features: mailing list, hardware provisionning
**Versión proporcionada:** 20231216~ynh1
**Versión proporcionada:** 20231216~ynh2
## Capturas de pantalla

58
README_id.md Normal file
View file

@ -0,0 +1,58 @@
<!--
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Ini TIDAK boleh diedit dengan tangan.
-->
# Coin untuk YunoHost
[![Tingkat integrasi](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![Pasang Coin dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
> *Paket ini memperbolehkan Anda untuk memasang Coin secara cepat dan mudah pada server YunoHost.*
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
## Ringkasan
COIN is an Information System designed for associative ISPs in the FFDN.
### Features
- Provide a nice, clean UI for members
- Manage memberships
- Handle service requests for VPN, VPS, Housing, external accounts, etc,
- including IP pools management
- custom hooks can be added to interface with the actual infrastructure and provision services from the admin
- members can get status info regarding their services
- handle invoices, send reminders, import payment from bank, derive a member balance
- Optional features: mailing list, hardware provisionning
**Versi terkirim:** 20231216~ynh2
## Tangkapan Layar
![Tangkapan Layar pada Coin](./doc/screenshots/screenshot.png)
## Dokumentasi dan sumber daya
- Website aplikasi resmi: <https://code.ffdn.org/FFDN/coin>
- Depot kode aplikasi hulu: <https://code.ffdn.org/ffdn/coin>
- Gudang YunoHost: <https://apps.yunohost.org/app/coin>
- Laporkan bug: <https://github.com/YunoHost-Apps/coin_ynh/issues>
## Info developer
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/coin_ynh/tree/testing).
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/coin_ynh/tree/testing --debug
atau
sudo yunohost app upgrade coin -u https://github.com/YunoHost-Apps/coin_ynh/tree/testing --debug
```
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>

View file

@ -5,7 +5,7 @@
# YunoHost 上的 Coin
[![集成程度](https://dash.yunohost.org/integration/coin.svg)](https://dash.yunohost.org/appci/app/coin) ![工作状态](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![集成程度](https://dash.yunohost.org/integration/coin.svg)](https://ci-apps.yunohost.org/ci/apps/coin/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/coin.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/coin.maintain.svg)
[![使用 YunoHost 安装 Coin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=coin)
@ -30,7 +30,7 @@ COIN is an Information System designed for associative ISPs in the FFDN.
- Optional features: mailing list, hardware provisionning
**分发版本:** 20231216~ynh1
**分发版本:** 20231216~ynh2
## 截图

View file

@ -1,4 +1,4 @@
command = '__INSTALL_DIR/venv/bin/gunicorn'
command = '__INSTALL_DIR__/venv/bin/gunicorn'
pythonpath = '__INSTALL_DIR__'
workers = 4
user = '__APP__'

View file

@ -7,10 +7,11 @@ DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['{{ domain }}']
URL_PREFIX = '{{ prefix }}'
# Prefix is hard coded for now as the app can only be installed on whole domain
URL_PREFIX = ''
STATIC_ROOT = '{{ install_dir }}/static'
NOTIFICATION_EMAILS = ['{{ email }}']
DEFAULT_FROM_EMAIL = 'notifier@{{ domain }}'
DEFAULT_FROM_EMAIL = '{{ app }}@{{ domain }}'
SITE_URL = "https://{{ domain }}{{ path }}"
SECRET_KEY = '{{ secret }}'
ISP = {
@ -29,13 +30,18 @@ DATABASES = {
'USER': '{{ db_user }}',
'PASSWORD': '{{ db_pwd }}',
'HOST': '127.0.0.1',
'PORT': '5432',
'PORT': '5432',
},
}
FEEDS = (('ffdn', 'http://www.ffdn.org/fr/rss.xml', 3),)
# Email settings
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = '{{ domain }}'
EMAIL_HOST_USER = '{{ app }}@{{ domain }}'
EMAIL_HOST_PASSWORD = '{{ mail_pwd }}'
# # Tous acces
# # parametrer SSO en protect_uris

View file

@ -7,7 +7,7 @@ name = "Coin"
description.en = "Member dashboard for non profit isp."
description.fr = "Coin est un Outil pour un Internet Neutre."
version = "20231216~ynh1"
version = "20231216~ynh2"
maintainers = ["ljf", "aleks"]
@ -17,7 +17,7 @@ website = "https://code.ffdn.org/FFDN/coin"
code = "https://code.ffdn.org/ffdn/coin"
[integration]
yunohost = ">= 11.2.0"
yunohost = ">= 11.2.20"
architectures = "all"
multi_instance = false
ldap = false
@ -28,11 +28,9 @@ ram.runtime = "50M"
[install]
[install.domain]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "domain"
[install.admin]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "user"
[install.email]
@ -49,17 +47,18 @@ ram.runtime = "50M"
[install.isp_site]
ask.en = "Enter the address of your ISP website"
ask.fr = "Saisissez l'adresse du siteweb de votre FAI"
ask.fr = "Saisissez l'adresse du site web de votre FAI"
type = "string"
example = "https://www.exemple.tld"
[resources]
[resources.sources.main]
url = "https://code.ffdn.org/ffdn/coin/-/archive/bcaad5f.tar.gz"
sha256 = "241d527c7bab5410bcc225d5beeff8286aa8ae649b9711c421624ae96136cdd7"
autoupdate.strategy = "latest_gitlab_commit"
[resources.sources.main]
url = "https://code.ffdn.org/ffdn/coin/-/archive/bcaad5f.tar.gz"
sha256 = "241d527c7bab5410bcc225d5beeff8286aa8ae649b9711c421624ae96136cdd7"
autoupdate.strategy = "latest_gitlab_commit"
[resources.system_user]
allow_email = true
[resources.install_dir]

View file

@ -9,11 +9,24 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP THE DATABASE
#=================================================
ynh_print_info --message="Backing up the PostgreSQL database..."
ynh_psql_dump_db --database="$db_name" > db.sql
#=================================================

View file

@ -7,9 +7,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
ynh_change_url_nginx_config
ynh_backup_if_checksum_is_different --file="$install_dir/coin/settings_local.py"
ynh_render_template ../conf/local.py.j2 "$install_dir/coin/settings_local.py"
ynh_store_file_checksum --file="$install_dir/coin/settings_local.py"
ynh_add_config --jinja --template=local.py.j2 --destination="$install_dir/coin/settings_local.py"
chmod 400 "$install_dir/coin/settings_local.py"
chown $app "$install_dir/coin/settings_local.py"

View file

@ -3,7 +3,7 @@
source _common.sh
source /usr/share/yunohost/helpers
export secret=$(ynh_string_random 24)
secret=$(ynh_string_random 24)
ynh_app_setting_set --app=$app --key=secret --value=$secret
#=================================================
@ -37,10 +37,7 @@ popd
#=================================================
ynh_script_progression --message="Configuring application..."
export prefix="${path#"/"}/"
prefix=${prefix%"/"}
ynh_render_template ../conf/local.py.j2 "$install_dir/coin/settings_local.py"
ynh_store_file_checksum --file="$install_dir/coin/settings_local.py"
ynh_add_config --jinja --template=local.py.j2 --destination="$install_dir/coin/settings_local.py"
chmod 400 "$install_dir/coin/settings_local.py"
chown $app "$install_dir/coin/settings_local.py"

View file

@ -3,7 +3,10 @@
source _common.sh
source /usr/share/yunohost/helpers
ynh_script_progression --message="Removing system configurations..." --weight=1
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
@ -17,8 +20,6 @@ ynh_remove_systemd_config
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Remove the log files
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -56,19 +56,12 @@ systemctl enable $app.service --quiet
yunohost service add $app --description "$app daemon" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
#=================================================