DMTryptaminesX from Reddit.

Join The Garden for reviews on popular botanical vendors.

  • 3 Posts
  • 12 Comments
Joined 3Y ago
cake
Cake day: Apr 01, 2022

help-circle
rss
How Can I Use 2 Lemmy Front Ends for a Single Backend?
I understand this isn't supported. I've been trying to confangle this myself but not having much luck, feels like I'm missing some critical info on how to configure `docker-compose.yml `and `nginx.conf`. I've tried a few iterations now but here's what I thought would be close. These are the only two files I've edited thus far, I'm using 0.16.2 for my 2nd front end so I can tell when I'm using it. I can view localhost:1236 fine but not localhost:1237 which gives me 502 bad gateway error, favicon still appears in tab though. I'm thinking I need to open a separate port on lemmy to config another upstream entry in my nginx.conf? In prod the goal would be to have each frontend under a different subdomain for a research project I have in mind. `docker-compose.yml` ``` version: '3.3' services: nginx: image: nginx:1-alpine ports: - "1236:1236" - "1237:1237" volumes: - ./nginx.conf:/etc/nginx/nginx.conf restart: always depends_on: - pictrs - lemmy-ui - lemmy-uir lemmy: image: lemmy-dev:latest ports: - "8536:8536" - "6669:6669" restart: always environment: - RUST_LOG="warn,lemmy_server=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=de> volumes: - ../lemmy.hjson:/config/config.hjson depends_on: - pictrs - postgres - otel lemmy-ui: image: dessalines/lemmy-ui:0.16.3 restart: always environment: - LEMMY_INTERNAL_HOST=lemmy:8536 - LEMMY_EXTERNAL_HOST=localhost:1234 - LEMMY_HTTPS=false - LEMMY_UI_DEBUG=true depends_on: - lemmy lemmy-uir: image: dessalines/lemmy-ui:0.16.2 restart: always environment: - LEMMY_INTERNAL_HOST=lemmy:8536 - LEMMY_EXTERNAL_HOST=localhost:1235 - LEMMY_HTTPS=false - LEMMY_UI_DEBUG=true depends_on: - lemmy ``` `nginx.conf` ``` worker_processes 1; events { worker_connections 1024; } http { upstream lemmy { server "lemmy:8536"; } upstream lemmy-ui { server "lemmy-ui:1234"; } server { listen 1236; server_name localhost 127.0.0.1; # frontend location / { set $proxpass "http://lemmy-ui"; if ($http_accept = "application/activity+json") { set $proxpass "http://lemmy"; } if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { set $proxpass "http://lemmy"; } if ($request_method = POST) { set $proxpass "http://lemmy"; } proxy_pass $proxpass; rewrite ^(.+)/+$ $1 permanent; # 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; } # backend location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass "http://lemmy"; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; # Add IP forwarding headers proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } upstream lemmy-uir { server "lemmy-uir:1235"; } server { listen 1237; server_name localhost 127.0.0.1; # frontend location / { set $proxpass "http://lemmy-uir"; if ($http_accept = "application/activity+json") { set $proxpass "http://lemmy"; } if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { set $proxpass "http://lemmy"; } if ($request_method = POST) { set $proxpass "http://lemmy"; } proxy_pass $proxpass; rewrite ^(.+)/+$ $1 permanent; # 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; } # backend location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass "http://lemmy"; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; # Add IP forwarding headers proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } } ``` logs for `lemmy-uir`, identical logs to `lemmy-ui` ``` docker-compose logs --tail=100 lemmy-uir Attaching to dev_lemmy-uir_1 lemmy-uir_1 | Inferno is in development mode. lemmy-uir_1 | httpbase: http://lemmy:8536 lemmy-uir_1 | wsUri: ws://lemmy:8536/api/v3/ws lemmy-uir_1 | isHttps: false lemmy-uir_1 | No JWT cookie found. lemmy-uir_1 | http://0.0.0.0:1234 ``` Grabbed this from the nginx logs: ``` nginx_1 | 2022/05/20 10:44:34 [error] 33#33: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.137.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://172.25.0.8:1235/", host: "192.168.137.132:1237" nginx_1 | 192.168.137.1 - - [20/May/2022:10:44:34 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36" nginx_1 | 2022/05/20 10:44:34 [error] 33#33: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.137.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "http://172.25.0.8:1235/favicon.ico", host: "192.168.137.132:1237", referrer: "http://192.168.137.132:1237/ ```
fedilink

What is offensive is just a personal perspective so you’re gunna get mixed answers. Ultimately it will always come down to what the person meant by it and how the other person perceives it, by default that is a mixed bag of emotions and reactions.

I’ll note that I do something I call synonym panic where I get to a keyword in a sentence and I kind of blank, start struggling for words then start cycling through all the possible words I could use it and often land on some pretty odd sentences. Referring to the ‘past’ as the ‘back-timies’ as a prime example or more commonly just saying the ‘stuff’ or ‘things’ because I’m afraid I’m about to choose the wrong word.


Are you able to use proxy servers going from: you>Tor>VPN/Proxy>Destination?

I use this path when trying to appear normal online since Tor does anything but, there’s limitations sure but if you wanna be anonymous while not sticking out terribly then it’s a great method imo. Would be curious to hear if anyone does anything similar.


In Canada you can get letters from your ISP on behalf of a media company essentially stating it was detected that the IP for this address has been downloading copyrighted content. They are unenforceable but if you wanna avoid them then a VPN works like a charm.


I've been messing around with a self-hosted ELK stack and am curious on using it's APM for lemmy. I would have to setup another server to do this it seems so I'd like to get some insight into what others are doing. Picture is a screenshot of a metrics dashboard I'm getting with metricbeat + system module, not getting much with the docker one yet for some reason. I was able to get it with an Elastic Agent and the docker integration but I switched to this since it was kinda heavy on the memory.
fedilink

Would be nice to have a feature that automatically creates a link to access a community from the instance you’re on. Like if you just link https://sopuli.xyz/c/moderatepolitics then I could hover over it or click a button to generate a link so I don’t have to leave my instance to view it.


Yes but as with most things with proton they lock down the good features behind a payment model, to each their own I know we all gotta make money somehow.

I’ve been using cryptpad.fr for a while which is opensource and self-hostable, you canmake multiple calendars and share among a team but proton has more features otherwise. Obviously not one to one with proton since they are an email service and this is an office suite but they compliment each other nicely. I only use proton for their email since I have simple needs.


I would use DDG (or any privacy search provider like startpage or Mojeek ) in Whonix and you want actual protections. Putting your faith in a for profit company to keep your safe when using their free online services ends in your being exploited somehow, somewhere, everytime. It’s inevitable if you’re the product.


ADHD is a spectrum that presents differently in sexes but can also have other disorders closely related. My ADHD made me more reclusive and not very spontaneous because of a comorbid with anxiety, over thinking everything. I got treated for my anxiety and was once that faded my impulsiveness was uncontrollable. I was well into adulthood before I got treated and I regret waiting so long just because of how effective it was, Atomoxetine+Vyvanse has been awesome.

I obviously can’t diagnose you over the internet and I’m missing a few degrees to be qualified but after reading your comments here it sounds like a route you should investigate further with a dr.

You could write

Working on hyper obsessions while staring into space in-between motivation cycles

on my tombstone lol


What's your pro-tip for using Lemmy? I'll go 1st!
Using Lemmy from a personal instance requires a little bit of work if you wanna start federating with the wider ecosystem and personalize your content. You just simply copy/paste the URL of the community you wanna view into your instances search bar and BOOM! We're federating. But what I noticed is that you **must** use your keyboard to search by hitting `Enter` when using the top search bar on almost any lemmy page, the exception would the dedicated search page. Either way you still have to take two actions in order to search; one action too many in my opinion so lets shorten that. To side step this I setup two hotkeys using the [AutoControl browser add-on](https://www.autocontrol.app/). If someone has a better way please let me know! - `right click hold for 1s` = `paste+enter` - `ctrl+shift+v` = `paste+enter` ![](https://fuckreddit.tryp.digital/pictrs/image/0bfd050f-4930-48f1-a686-f7c8b1e677ae.png) This way no matter which page I'm on or if I'm only using my mouse I can execute one action to paste+search instantly! Makes searching for instances to federate with a breeze along with subscribing to their communities.
fedilink

Transfer speeds are great too and if you’re on USB-C then you can transfer your entire media library in minutes, I do this every so often to clear space since HD photos and videos are ridiculously huge now.




I would also change smtp_server and pictrs_url the following

smtp_server: "postfix:25"

pictrs_url: "http://pictrs:8080"

I would also edit your no reply address to your domain if that’s not a place holder you put there.


For postgres

host: "localhost"

Should be

host: postgres

So is this what you copy/pasted into config.hjson on your deployment server and what edits did you make to it before running? Anything to the postgres password?