mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-14 16:34:01 +00:00
Add Lemmy Lite to federation setup and Ansible deployment
This commit is contained in:
parent
a689619f62
commit
d89d6197ab
6 changed files with 40 additions and 13 deletions
|
@ -78,10 +78,6 @@
|
|||
vars:
|
||||
lemmy_docker_image: "dessalines/lemmy:{{ lookup('file', 'VERSION') }}"
|
||||
lemmy_docker_ui_image: "dessalines/lemmy-ui:{{ lookup('file', 'VERSION') }}"
|
||||
lemmy_port: "8536"
|
||||
lemmy_ui_port: "1235"
|
||||
pictshare_port: "8537"
|
||||
iframely_port: "8538"
|
||||
|
||||
- name: add config file (only during initial setup)
|
||||
template:
|
||||
|
|
|
@ -27,6 +27,15 @@ services:
|
|||
depends_on:
|
||||
- lemmy
|
||||
|
||||
lemmy-lite:
|
||||
image: ironoxidizer/lemmy-lite:0.3.0-rc1
|
||||
ports:
|
||||
- "127.0.0.1:1131:1131"
|
||||
environment:
|
||||
- LEMMY_INTERNAL_HOST=lemmy:8536
|
||||
depends_on:
|
||||
- lemmy
|
||||
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
environment:
|
||||
|
@ -40,8 +49,6 @@ services:
|
|||
pictrs:
|
||||
image: asonix/pictrs:v0.2.4-r0
|
||||
user: 991:991
|
||||
ports:
|
||||
- "127.0.0.1:8537:8080"
|
||||
volumes:
|
||||
- ./volumes/pictrs:/mnt
|
||||
restart: always
|
||||
|
|
|
@ -51,7 +51,7 @@ server {
|
|||
# Upload limit for pictrs
|
||||
client_max_body_size 20M;
|
||||
|
||||
# frontend
|
||||
# standard frontend
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
|
@ -61,21 +61,29 @@ server {
|
|||
# lemmy_ui_port: 1235
|
||||
# lemmy_port: 8536
|
||||
|
||||
set $proxpass "http://0.0.0.0:{{ lemmy_ui_port }}";
|
||||
set $proxpass "http://0.0.0.0:1235";
|
||||
if ($http_accept = "application/activity+json") {
|
||||
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
|
||||
set $proxpass "http://0.0.0.0:8536";
|
||||
}
|
||||
if ($request_method = POST) {
|
||||
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
|
||||
set $proxpass "http://0.0.0.0:8536";
|
||||
}
|
||||
proxy_pass $proxpass;
|
||||
|
||||
rewrite ^(.+)/+$ $1 permanent;
|
||||
}
|
||||
|
||||
# lemmy lite frontend
|
||||
location /lite {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass "http://0.0.0.0:1131";
|
||||
}
|
||||
|
||||
# backend
|
||||
location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
|
||||
proxy_pass http://0.0.0.0:{{ lemmy_port }};
|
||||
proxy_pass http://0.0.0.0:8536;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
|
|
@ -27,9 +27,11 @@ services:
|
|||
depends_on:
|
||||
- lemmy
|
||||
lemmy-lite:
|
||||
image: lemmy-lite
|
||||
image: ironoxidizer/lemmy-lite:0.3.0-rc1
|
||||
ports:
|
||||
- "1132:1131"
|
||||
- "1131:1131"
|
||||
environment:
|
||||
- LEMMY_INTERNAL_HOST=lemmy:8536
|
||||
depends_on:
|
||||
- lemmy
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ services:
|
|||
- pictrs
|
||||
- iframely
|
||||
- lemmy-alpha-ui
|
||||
- lemmy-alpha-lite
|
||||
- lemmy-beta-ui
|
||||
- lemmy-gamma-ui
|
||||
- lemmy-delta-ui
|
||||
|
@ -36,6 +37,12 @@ services:
|
|||
- LEMMY_HTTPS=false
|
||||
depends_on:
|
||||
- lemmy-alpha
|
||||
lemmy-alpha-lite:
|
||||
image: ironoxidizer/lemmy-lite:0.3.0-rc1
|
||||
environment:
|
||||
- LEMMY_INTERNAL_HOST=lemmy-alpha:8541
|
||||
depends_on:
|
||||
- lemmy-alpha
|
||||
lemmy-alpha:
|
||||
image: lemmy-federation:latest
|
||||
environment:
|
||||
|
|
|
@ -43,6 +43,13 @@ http {
|
|||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
location /lite {
|
||||
proxy_pass http://lemmy-alpha-lite:1131;
|
||||
|
||||
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-beta {
|
||||
|
|
Loading…
Reference in a new issue