mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 15:39:11 +00:00
Updating nginx.conf, upgrading pict-rs
This commit is contained in:
parent
9f50432999
commit
cb128256ed
25
ansible/templates/nginx.conf
vendored
25
ansible/templates/nginx.conf
vendored
|
@ -71,23 +71,20 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirect pictshare images to pictrs
|
# Redirect pictshare images to pictrs
|
||||||
rewrite ^(/pictshare/.*)$ /pictrs/image/$1;
|
location ~ /pictshare/(.*)$ {
|
||||||
|
return 301 /pictrs/image/$1;
|
||||||
|
}
|
||||||
|
|
||||||
# pict-rs images
|
# pict-rs images
|
||||||
location /pictrs/image/ {
|
location /pictrs {
|
||||||
proxy_pass http://0.0.0.0:8537/;
|
location /pictrs/image {
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_pass http://0.0.0.0:8537/image/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
# Block the import
|
# Block the import
|
||||||
location /pictrs/import {
|
return 403;
|
||||||
return 403;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) {
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /iframely/ {
|
location /iframely/ {
|
||||||
|
|
2
docker/dev/docker-compose.yml
vendored
2
docker/dev/docker-compose.yml
vendored
|
@ -28,7 +28,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
pictrs:
|
pictrs:
|
||||||
image: asonix/pictrs:v0.1.4-r0
|
image: asonix/pictrs:v0.1.13-r0
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8537:8080"
|
- "127.0.0.1:8537:8080"
|
||||||
user: 991:991
|
user: 991:991
|
||||||
|
|
10
docker/prod/docker-compose.yml
vendored
10
docker/prod/docker-compose.yml
vendored
|
@ -25,14 +25,14 @@ services:
|
||||||
- pictshare
|
- pictshare
|
||||||
- iframely
|
- iframely
|
||||||
|
|
||||||
pictshare:
|
pictrs:
|
||||||
image: hascheksolutions/pictshare:latest
|
image: asonix/pictrs:v0.1.13-r0
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8537:80"
|
- "127.0.0.1:8537:8080"
|
||||||
|
user: 991:991
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/pictshare:/usr/share/nginx/html/data
|
- ./volumes/pictrs:/mnt
|
||||||
restart: always
|
restart: always
|
||||||
mem_limit: 100m
|
|
||||||
|
|
||||||
iframely:
|
iframely:
|
||||||
image: dogbin/iframely:latest
|
image: dogbin/iframely:latest
|
||||||
|
|
Loading…
Reference in a new issue