mirror of
https://github.com/YunoHost-Apps/lemmy_ynh.git
synced 2024-09-03 19:36:09 +02:00
commit
e34977352e
9 changed files with 37 additions and 18 deletions
|
@ -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/
|
||||
|
||||
|
|
|
@ -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/
|
||||
|
||||
|
|
|
@ -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
1
doc/DESCRIPTION_fr.md
Normal 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.
|
|
@ -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"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
NODEJS_VERSION=18
|
||||
NODEJS_VERSION=20
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue