1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/listmonk_ynh.git synced 2024-09-03 19:36:15 +02:00

Merge pull request #41 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2023-11-12 20:59:57 +01:00 committed by GitHub
commit 2be9b1c27c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 7 deletions

View file

@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a PostgreSQL database as its data base.
**Shipped version:** 2.5.1~ynh2
**Shipped version:** 2.5.1~ynh3
**Demo:** https://demo.listmonk.app/

View file

@ -19,7 +19,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Listmonk est un gestionnaire de newsletter et de liste de diffusion autonome et auto-hébergé. Il est rapide, riche en fonctionnalités et emballé dans un seul binaire. Il utilise une base de données PostgreSQL comme base de données.
**Version incluse :** 2.5.1~ynh2
**Version incluse :** 2.5.1~ynh3
**Démo :** https://demo.listmonk.app/

16
doc/POST_INSTALL.md Normal file
View file

@ -0,0 +1,16 @@
You have to configure SMTP from the web interface at https://__DOMAIN__/admin
Visit Settings -> General and replace these values:
- Root URL: https://__DOMAIN__
- Default from email: listmonk <__APP__@__DOMAIN__>
Visit Settings -> SMTP and replace with these values:
- Host: 127.0.0.1
- Port: 25
- Auth protocol: PLAIN
- User: __APP__
- Password: __MAIL_PWD__
Then, test the connection

View file

@ -5,7 +5,7 @@ name = "Listmonk"
description.en = "Newsletter and mailing list manager"
description.fr = "Manager de newsletter et mailing list"
version = "2.5.1~ynh2"
version = "2.5.1~ynh3"
maintainers = ["Navan Chauhan"]
@ -34,9 +34,6 @@ ram.runtime = "50M"
type = "group"
default = "visitors"
[install.admin]
type = "user"
[resources]
[resources.sources]
@ -50,7 +47,13 @@ ram.runtime = "50M"
arm64.sha256 = "832c5a34ed78446c179ed5423cdbce51d3e51333c1ea6cf11c74b63e0776193a"
in_subdir = false
autoupdate.strategy = "latest_github_release"
autoupdate.asset.amd64 = ".*_linux_amd64.tar.gz"
autoupdate.asset.armhf = ".*_linux_armv7.tar.gz"
autoupdate.asset.arm64 = ".*_linux_arm64.tar.gz"
[resources.system_user]
allow_email = true
[resources.ports]
@ -65,10 +68,11 @@ ram.runtime = "50M"
admin.auth_header = false
admin.allowed = "admins"
# internal API, should not be allowed to visitors
api.url = "/api"
api.show_tile = false
api.auth_header = false
api.allowed = "visitors"
api.allowed = "admins"
[resources.apt]
packages = "postgresql"

View file

@ -8,6 +8,29 @@
# PERSONAL HELPERS
#=================================================
# FIXME https://listmonk.app/docs/swagger/#/Settings/getSettings
_listmonk_configure_with_api () {
python -c """
from urllib.request import urlopen, Request
with urlopen('http://localhost:$port/api/settings') as url:
data = json.load(url)
data['data']['app.root_url'] = "https://$domain"
data['data']['app.from_email'] = "listmonk <noreply@$domain>"
data['data']['smtp'][0]['host'] = "127.0.0.1"
data['data']['smtp'][0]['auth_protocol'] = "plain"
data['data']['smtp'][0]['username'] = "$app"
data['data']['smtp'][0]['password'] = "$mail_pwd"
data_bytes = bytes(json.dumps(data), encoding='utf8')
request = Request('http://localhost:$port/api/settings', method='PUT', data=data_bytes, headers={'Content-Type': 'application/json'})
with urlopen(request) as response:
print(response.read())
"""
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -7,3 +7,6 @@ test_format = 1.0
# -------------------------------
test_upgrade_from.4b1297d8.name = "Upgrade from 2.3.0"
test_upgrade_from.4b1297d8.args.admin = "package_checker"
test_upgrade_from.4b1297d8.args.password = "much_s3cur1ty"
test_upgrade_from.4b1297d8.args.domain = "domain.tld"