]> Untitled Git - lemmy.git/commitdiff
Updating nginx.conf, upgrading pict-rs
authorDessalines <tyhou13@gmx.com>
Mon, 22 Jun 2020 12:31:15 +0000 (08:31 -0400)
committerDessalines <tyhou13@gmx.com>
Mon, 22 Jun 2020 12:31:15 +0000 (08:31 -0400)
ansible/templates/nginx.conf
docker/dev/docker-compose.yml
docker/prod/docker-compose.yml

index 6a1c13c18e4a6db1eafa228f0f18cab75736fb9a..bdf80bc5d081a7ee5fa76dac282e51b5f552295c 100644 (file)
@@ -71,23 +71,20 @@ server {
     }    
 
     # Redirect pictshare images to pictrs
-    rewrite ^(/pictshare/.*)$ /pictrs/image/$1;
+    location ~ /pictshare/(.*)$ {
+      return 301 /pictrs/image/$1;
+    }
 
     # pict-rs images
-    location /pictrs/image/ {
-      proxy_pass http://0.0.0.0:8537/;
-      proxy_set_header X-Real-IP $remote_addr;
-      proxy_set_header Host $host;
-      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
-      # Block the import
-      location /pictrs/import {
-        return 403;
+    location /pictrs {
+      location /pictrs/image {
+        proxy_pass http://0.0.0.0:8537/image/;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header Host $host;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       }
-
-      if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) {
-        add_header Cache-Control "public, max-age=31536000, immutable";
-      }   
+      # Block the import
+      return 403;
     }
 
     location /iframely/ {
index 2072024f34c9a5e0e3f56587f5088f8fae5c5b97..2575171e930a1aa9951551dffa5dbb7e6ce97798 100644 (file)
@@ -28,7 +28,7 @@ services:
     restart: always
 
   pictrs:
-    image: asonix/pictrs:v0.1.4-r0
+    image: asonix/pictrs:v0.1.13-r0
     ports: 
       - "127.0.0.1:8537:8080"
     user: 991:991
index 246a95860fb2101f008f2a640b133ce31440ddf6..30b17c3c02d6689ace39826d1a5142273e9d4a64 100644 (file)
@@ -25,14 +25,14 @@ services:
       - pictshare
       - iframely
 
-  pictshare:
-    image: hascheksolutions/pictshare:latest
-    ports:
-      - "127.0.0.1:8537:80"
+  pictrs:
+    image: asonix/pictrs:v0.1.13-r0
+    ports: 
+      - "127.0.0.1:8537:8080"
+    user: 991:991
     volumes:
-      - ./volumes/pictshare:/usr/share/nginx/html/data
+      - ./volumes/pictrs:/mnt
     restart: always
-    mem_limit: 100m
 
   iframely:
     image: dogbin/iframely:latest