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:
|
vars:
|
||||||
lemmy_docker_image: "dessalines/lemmy:{{ lookup('file', 'VERSION') }}"
|
lemmy_docker_image: "dessalines/lemmy:{{ lookup('file', 'VERSION') }}"
|
||||||
lemmy_docker_ui_image: "dessalines/lemmy-ui:{{ 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)
|
- name: add config file (only during initial setup)
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -27,6 +27,15 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy
|
- 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:
|
postgres:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
environment:
|
environment:
|
||||||
|
@ -40,8 +49,6 @@ services:
|
||||||
pictrs:
|
pictrs:
|
||||||
image: asonix/pictrs:v0.2.4-r0
|
image: asonix/pictrs:v0.2.4-r0
|
||||||
user: 991:991
|
user: 991:991
|
||||||
ports:
|
|
||||||
- "127.0.0.1:8537:8080"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/pictrs:/mnt
|
- ./volumes/pictrs:/mnt
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
@ -51,7 +51,7 @@ server {
|
||||||
# Upload limit for pictrs
|
# Upload limit for pictrs
|
||||||
client_max_body_size 20M;
|
client_max_body_size 20M;
|
||||||
|
|
||||||
# frontend
|
# standard frontend
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
@ -61,21 +61,29 @@ server {
|
||||||
# lemmy_ui_port: 1235
|
# lemmy_ui_port: 1235
|
||||||
# lemmy_port: 8536
|
# 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") {
|
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) {
|
if ($request_method = POST) {
|
||||||
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
|
set $proxpass "http://0.0.0.0:8536";
|
||||||
}
|
}
|
||||||
proxy_pass $proxpass;
|
proxy_pass $proxpass;
|
||||||
|
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
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
|
# backend
|
||||||
location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
|
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_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
|
@ -27,9 +27,11 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy
|
- lemmy
|
||||||
lemmy-lite:
|
lemmy-lite:
|
||||||
image: lemmy-lite
|
image: ironoxidizer/lemmy-lite:0.3.0-rc1
|
||||||
ports:
|
ports:
|
||||||
- "1132:1131"
|
- "1131:1131"
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy:8536
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy
|
- lemmy
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ services:
|
||||||
- pictrs
|
- pictrs
|
||||||
- iframely
|
- iframely
|
||||||
- lemmy-alpha-ui
|
- lemmy-alpha-ui
|
||||||
|
- lemmy-alpha-lite
|
||||||
- lemmy-beta-ui
|
- lemmy-beta-ui
|
||||||
- lemmy-gamma-ui
|
- lemmy-gamma-ui
|
||||||
- lemmy-delta-ui
|
- lemmy-delta-ui
|
||||||
|
@ -36,6 +37,12 @@ services:
|
||||||
- LEMMY_HTTPS=false
|
- LEMMY_HTTPS=false
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy-alpha
|
- 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:
|
lemmy-alpha:
|
||||||
image: lemmy-federation:latest
|
image: lemmy-federation:latest
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -43,6 +43,13 @@ http {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
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 {
|
upstream lemmy-beta {
|
||||||
|
|
Loading…
Reference in a new issue