Skip to content

Commit

Permalink
Merge pull request #50 from YunoHost-Apps/0.18.0
Browse files Browse the repository at this point in the history
0.18.1
  • Loading branch information
ericgaspar authored Jul 12, 2023
2 parents 38e30e7 + 8764948 commit e39d256
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
5 changes: 2 additions & 3 deletions README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
9 changes: 4 additions & 5 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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__";
}
Expand All @@ -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;
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions doc/DESCRIPTION_fr.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 6 additions & 3 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand All @@ -23,7 +23,7 @@ multi_instance = false
ldap = false
sso = false
disk = "50M"
ram.build = "100M"
ram.build = "500M"
ram.runtime = "50M"

[install.domain]
Expand Down Expand Up @@ -51,7 +51,7 @@ ram.runtime = "50M"

[resources.ports]
main.default = 8536
ui.default = 8537
ui.default = 1235

[resources.system_user]

Expand All @@ -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"
2 changes: 1 addition & 1 deletion scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# COMMON VARIABLES
#=================================================

NODEJS_VERSION=18
NODEJS_VERSION=20

#=================================================
# PERSONAL HELPERS
Expand Down
14 changes: 11 additions & 3 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -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
#=================================================
Expand Down Expand Up @@ -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
#=================================================
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -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
#=================================================
Expand Down
4 changes: 2 additions & 2 deletions tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit e39d256

Please sign in to comment.