mirror of https://github.com/LemmyNet/lemmy.git
Adding nginx, fixing up docker-compose files, fixing docs.
parent
3136df3334
commit
4023fe96fc
|
@ -51,23 +51,41 @@ server {
|
||||||
# Upload limit for pictrs
|
# Upload limit for pictrs
|
||||||
client_max_body_size 20M;
|
client_max_body_size 20M;
|
||||||
|
|
||||||
|
# lemmy api
|
||||||
|
location /api/v1 {
|
||||||
|
proxy_pass http://0.0.0.0:8536/api/v1;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
# Cuts off the trailing slash on URLs to make them valid
|
||||||
|
rewrite ^(.+)/+$ $1 permanent;
|
||||||
|
|
||||||
|
# WebSocket support
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# Rate limit
|
||||||
|
limit_req zone=lemmy_ratelimit burst=30 nodelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Docs
|
||||||
|
location /docs {
|
||||||
|
proxy_pass http://0.0.0.0:8536/docs;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
# lemmy-isomorphic-ui
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://0.0.0.0:8536;
|
proxy_pass http://0.0.0.0:1235;
|
||||||
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;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
# Cuts off the trailing slash on URLs to make them valid
|
|
||||||
rewrite ^(.+)/+$ $1 permanent;
|
|
||||||
|
|
||||||
# WebSocket support
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
|
|
||||||
# Rate limit
|
|
||||||
limit_req zone=lemmy_ratelimit burst=30 nodelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Redirect pictshare images to pictrs
|
# Redirect pictshare images to pictrs
|
||||||
location ~ /pictshare/(.*)$ {
|
location ~ /pictshare/(.*)$ {
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
port: 8536
|
port: 8536
|
||||||
# json web token for authorization between server and client
|
# json web token for authorization between server and client
|
||||||
jwt_secret: "changeme"
|
jwt_secret: "changeme"
|
||||||
# The location of the frontend
|
|
||||||
front_end_dir: "../ui/dist"
|
|
||||||
# address where pictrs is available
|
# address where pictrs is available
|
||||||
pictrs_url: "http://pictrs:8080"
|
pictrs_url: "http://pictrs:8080"
|
||||||
# rate limits for various user actions, by user ip
|
# rate limits for various user actions, by user ip
|
||||||
|
|
|
@ -16,11 +16,14 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
- iframely
|
- iframely
|
||||||
lemmy-isomorphic-ui:
|
lemmy-isomorphic-ui:
|
||||||
image: lemmy-isomorphic-ui:latest
|
image: dessalines/lemmy-isomorphic-ui:v0.0.5
|
||||||
|
# image: lemmy-isomorphic-ui:latest
|
||||||
ports:
|
ports:
|
||||||
- "1235:1234"
|
- "1235:1234"
|
||||||
environment:
|
environment:
|
||||||
- LEMMY_HOST=lemmy
|
- LEMMY_INTERNAL_HOST=lemmy:8536
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8536
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy
|
- lemmy
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
# host where postgres is running
|
# host where postgres is running
|
||||||
host: "postgres"
|
host: "postgres"
|
||||||
}
|
}
|
||||||
# The location of the frontend
|
|
||||||
front_end_dir: "/app/dist"
|
|
||||||
# # optional: email sending configuration
|
# # optional: email sending configuration
|
||||||
# email: {
|
# email: {
|
||||||
# # hostname of the smtp server
|
# # hostname of the smtp server
|
||||||
|
|
|
@ -25,6 +25,18 @@ services:
|
||||||
- pictrs
|
- pictrs
|
||||||
- iframely
|
- iframely
|
||||||
|
|
||||||
|
lemmy-isomorphic-ui:
|
||||||
|
image: dessalines/lemmy-isomorphic-ui:v0.0.5
|
||||||
|
# image: lemmy-isomorphic-ui:latest
|
||||||
|
ports:
|
||||||
|
- "1235:1234"
|
||||||
|
environment:
|
||||||
|
- LEMMY_INTERNAL_HOST=lemmy:8536
|
||||||
|
- LEMMY_EXTERNAL_HOST=localhost:8536
|
||||||
|
- LEMMY_HTTPS=false
|
||||||
|
depends_on:
|
||||||
|
- lemmy
|
||||||
|
|
||||||
pictrs:
|
pictrs:
|
||||||
image: asonix/pictrs:v0.1.13-r0
|
image: asonix/pictrs:v0.1.13-r0
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -98,7 +98,7 @@ async fn main() -> Result<(), LemmyError> {
|
||||||
.configure(|cfg| images::config(cfg, &rate_limiter))
|
.configure(|cfg| images::config(cfg, &rate_limiter))
|
||||||
.configure(nodeinfo::config)
|
.configure(nodeinfo::config)
|
||||||
.configure(webfinger::config)
|
.configure(webfinger::config)
|
||||||
.service(actix_files::Files::new("/docs", "/documentation"))
|
.service(actix_files::Files::new("/docs", "/app/documentation"))
|
||||||
})
|
})
|
||||||
.bind((settings.bind, settings.port))?
|
.bind((settings.bind, settings.port))?
|
||||||
.run()
|
.run()
|
||||||
|
|
Loading…
Reference in New Issue