pleroma initial template (#18)

Co-authored-by: muppeth <muppeth@disroot.org>
Reviewed-on: #18
Reviewed-by: antilopa <antilopa@no-reply@disroot.org>
Reviewed-by: meaz <meaz@no-reply@disroot.org>
Co-authored-by: muppeth <muppeth@no-reply@disroot.org>
Co-committed-by: muppeth <muppeth@no-reply@disroot.org>
This commit is contained in:
muppeth 2021-11-16 09:57:28 +00:00
parent 19f1bd4cb7
commit 1ed9505c6d
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
{% extends "core.j2" %}
{% block extra_upstreams %}
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g
inactive=720m use_temp_path=off;
upstream phoenix {
server 127.0.0.1:4000 max_fails=5 fail_timeout=60s;
}
{% endblock %}
{% block location %}
location / {
proxy_pass http://phoenix;
}
location ~ ^/(media|proxy) {
proxy_cache pleroma_media_cache;
slice 1m;
proxy_cache_key $host$uri$is_args$args$slice_range;
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 301 304 1h;
proxy_cache_lock on;
proxy_ignore_client_abort on;
proxy_buffering on;
chunked_transfer_encoding on;
proxy_pass http://phoenix;
}
{% endblock %}