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

Merge branch 'testing' into pictrs

This commit is contained in:
Éric Gaspar 2023-07-12 10:38:06 +02:00
commit acbde41d42
9 changed files with 59 additions and 22 deletions

View file

@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**Shipped version:** 0.16.7~ynh2
**Shipped version:** 0.18.1~ynh1
**Demo:** https://lemmy.ml/

View file

@ -16,10 +16,9 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Vue densemble
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
Lemmy est similaire à des sites comme Reddit, Lobste.rs ou Hacker News : vous vous abonnez aux forums qui vous intéressent, publiez des liens et des discussions, puis votez et commentez-les. Dans les coulisses, c'est très différent ; n'importe qui peut facilement exécuter un serveur, et tous ces serveurs sont fédérés (pensez au courrier électronique) et connectés au même univers, appelé Fediverse.
**Version incluse :** 0.16.7~ynh2
**Version incluse :** 0.18.1~ynh1
**Démo :** https://lemmy.ml/

View file

@ -1,3 +1,5 @@
#https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/nginx_internal.conf
#limit_req_zone $binary_remote_addr zone=lemmy_ratelimit:10m rate=1r/s;
# Only connect to this site via HTTPS for the two years
@ -19,6 +21,7 @@ location / {
# lemmy_port: 8536
set $proxpass "http://127.0.0.1:__PORT_UI__";
if ($http_accept ~ "^application/.*$") {
set $proxpass "http://127.0.0.1:__PORT__";
}
@ -28,7 +31,6 @@ location / {
proxy_pass $proxpass;
rewrite ^(.+)/+$ $1 permanent;
# Send actual client IP upstream
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
@ -42,10 +44,7 @@ location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Rate limit
# limit_req zone=lemmy_ratelimit burst=30 nodelay;
# Add IP forwarding headers
# Send actual client IP upstream
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

1
doc/DESCRIPTION_fr.md Normal file
View file

@ -0,0 +1 @@
Lemmy est similaire à des sites comme Reddit, Lobste.rs ou Hacker News : vous vous abonnez aux forums qui vous intéressent, publiez des liens et des discussions, puis votez et commentez-les. Dans les coulisses, c'est très différent ; n'importe qui peut facilement exécuter un serveur, et tous ces serveurs sont fédérés (pensez au courrier électronique) et connectés au même univers, appelé Fediverse.

View file

@ -5,7 +5,7 @@ name = "Lemmy"
description.en = "Link aggregator/Reddit clone for the fediverse"
description.fr = "Agrégateur de liens/clone Reddit pour le fedivers"
version = "0.16.7~ynh2"
version = "0.18.1~ynh1"
maintainers = []
@ -17,19 +17,23 @@ admindoc = "https://join-lemmy.org/docs/en/"
code = "https://github.com/LemmyNet/lemmy"
[integration]
yunohost = ">= 11.1.20"
architectures = "all"
yunohost = ">= 11.1.21"
architectures = ["amd64"]
multi_instance = false
ldap = false
sso = false
disk = "50M"
ram.build = "100M"
ram.build = "500M"
ram.runtime = "50M"
[install.domain]
type = "domain"
full_domain = true
[install.init_main_permission]
type = "group"
default = "visitors"
[resources]
[resources.sources]
@ -40,15 +44,15 @@ ram.runtime = "50M"
autoupdate.strategy = "latest_github_commit"
[resources.sources.lemmy-translations]
url = "https://github.com/LemmyNet/lemmy-translations/archive/2b5f0a7422e85410ca4d7e5a240866fc40c91bc8.tar.gz"
sha256 = "6fbd8e1b9f565ab72dee07f2f60d71c0552c38f3293d8ed7669945e0440f6d1b"
url = "https://github.com/LemmyNet/lemmy-translations/archive/f1602a5993c426d56ebb7c98a8453fbfb482e9a7.tar.gz"
sha256 = "570d3f8c1ab13dbf72fd2f2f6d7a930a5fd7233259fbd0f1b156205524f0e4c3"
autoupdate.upstream = "https://github.com/LemmyNet/lemmy-translations/"
autoupdate.strategy = "latest_github_commit"
[resources.ports]
main.default = 8536
ui.default = 8537
pictrs.default = 8080
ui.default = 1235
[resources.system_user]
@ -59,13 +63,29 @@ ram.runtime = "50M"
[resources.permissions]
main.url = "/"
pict-rs.url = "/pictrs"
pict-rs.allowed = "visitors"
pict-rs.show_tile = false
pict-rs.protected = true
api.url = "/api"
api.allowed = "visitors"
api.auth_header = false
api.show_tile = false
api.protected = true
inbox.url = "/inbox"
inbox.allowed = "visitors"
inbox.auth_header = false
inbox.show_tile = false
inbox.protected = true
[resources.apt]
packages = "postgresql espeak"
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
extras.yarn.packages = "yarn"
[resources.database]
type = "postgresql"

View file

@ -4,9 +4,10 @@
# COMMON VARIABLES
#=================================================
NODEJS_VERSION=18
PICTRS_VERSION=0.4.0-rc.3
NODEJS_VERSION=20
#=================================================
# PERSONAL HELPERS
#=================================================

View file

@ -18,7 +18,6 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_use_nodejs
ln -fs /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
#=================================================
# CREATE A POSTGRESQL DATABASE
#=================================================
@ -48,6 +47,15 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# INSTALL SHARP
#=================================================
pushd $install_dir/lemmy-ui
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn add sharp
popd
#=================================================
# MAKE INSTALL
#=================================================
@ -132,8 +140,8 @@ yunohost service add $app-pict-rs --log="/var/log/$app/$app-pict-rs.log"
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting http server at" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app-ui --action="start" --line_match="http://0.0.0.0" --log_path="/var/log/$app/$app-ui.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Starting http server at"
ynh_systemd_action --service_name=$app-ui --action="start" --log_path="/var/log/$app/$app-ui.log" --line_match="http://0.0.0.0"
#=================================================
# END OF SCRIPT

View file

@ -85,6 +85,15 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# INSTALL SHARP
#=================================================
pushd $install_dir/lemmy-ui
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn add sharp
popd
#=================================================
# SPECIFIC UPGRADE
#=================================================

View file

@ -9,9 +9,9 @@ test_format = 1.0
args.admin = "john"
args.sitename = "lemmy website"
# -------------------------------
# Commits to test upgrade from
# -------------------------------
test_upgrade_from.206df4db0b99c52f07ea1a2d5daf799d4b8357fd.name = "Upgrade from 0.15.2~ynh3"
#test_upgrade_from.206df4db0b99c52f07ea1a2d5daf799d4b8357fd.name = "Upgrade from 0.15.2~ynh3"
test_upgrade_from.383e145946458933a81010282b77dd986978ad6c.name = "Upgrade from 0.16.7~ynh4"