diff --git a/README.md b/README.md index 6de0548..5234eee 100644 --- a/README.md +++ b/README.md @@ -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~ynh4 +**Shipped version:** 0.18.1~ynh1 **Demo:** https://lemmy.ml/ diff --git a/README_fr.md b/README_fr.md index 4227837..0c82ad3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,10 +16,9 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -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~ynh4 +**Version incluse :** 0.18.1~ynh1 **Démo :** https://lemmy.ml/ diff --git a/conf/nginx.conf b/conf/nginx.conf index 1ec7d21..b21f6da 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -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; diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..34188d4 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -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. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 6f71cf0..36e848f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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~ynh4" +version = "0.18.1~ynh1" maintainers = [] @@ -23,7 +23,7 @@ multi_instance = false ldap = false sso = false disk = "50M" -ram.build = "100M" +ram.build = "500M" ram.runtime = "50M" [install.domain] @@ -51,7 +51,7 @@ ram.runtime = "50M" [resources.ports] main.default = 8536 - ui.default = 8537 + ui.default = 1235 [resources.system_user] @@ -77,6 +77,9 @@ ram.runtime = "50M" [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" diff --git a/scripts/_common.sh b/scripts/_common.sh index 702e69f..75bdfd1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -NODEJS_VERSION=18 +NODEJS_VERSION=20 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index e4dab13..8e99d95 100755 --- a/scripts/install +++ b/scripts/install @@ -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 #================================================= @@ -47,6 +46,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 #================================================= @@ -121,8 +129,8 @@ yunohost service add $app-ui --log="/var/log/$app/$app-ui.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 diff --git a/scripts/upgrade b/scripts/upgrade index 06a9d25..f36f87d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #================================================= diff --git a/tests.toml b/tests.toml index 524d6d3..a213874 100644 --- a/tests.toml +++ b/tests.toml @@ -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" \ No newline at end of file + #test_upgrade_from.206df4db0b99c52f07ea1a2d5daf799d4b8357fd.name = "Upgrade from 0.15.2~ynh3" + test_upgrade_from.383e145946458933a81010282b77dd986978ad6c.name = "Upgrade from 0.16.7~ynh4"